summaryrefslogtreecommitdiff
path: root/man/github-mirror.conf.5
blob: f610857c883a9e3d5cbb95ba5018c8160c5d253e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.Dd 4/28/2025
.Dt GITHUB-MIRROR.CONF 5
.Os Darwin

.Sh NAME
.Nm github-mirror.conf
.Nd Configuration file for github-mirror

.Sh SYNOPSIS
.Nm

.Sh DESCRIPTION
The
.Nm
file contains options used to specify github-mirror configuration.

.Pp
The file is in a INI format, where each line contains an option field and a
value field, separated by an equals character '='.  For example:
.Bd -literal -offset indent
option = value
.Ed

There are also section headers, which are enclosed in square brackets.
For example:
.Bd -literal -offset indent
[section]
option = value
.Ed
Some sections can be repeated (ex. [github]), while others are not (ex. [git]).

Each line specifies a single option/value pair.
Whitespace can be used freely before and after fields.
A hash character '#' begins a comment that extends to the end of the line.

.Pp
The options in the github section (repeatable) are:
.Bl -tag -width -indent

.It Cm endpoint
The GitHub GraphQL API endpoint to use.  The default is
.Lk https://api.github.com/graphql

.It Cm token
The GitHub API token to use.  Required.

This can either be a literal token or a path to a file containing the token.

.It Cm user_agent
The User-Agent string to use.  The default is
.Dq Cm github-mirror/VERSION
where VERSION is the version of the program.

.It Cm owner
The owner of the repository to mirror.  Required.

.It Cm skip-forks
If set to true, skip mirroring fork repositories owned by the user.
The default is false.

.It Cm skip-private
If set to true, skip mirroring private repositories owned by the user.
The default is false.

.El

.Pp
The options in the srht section (repeatable) are:
.Bl -tag -width -indent

.It Cm endpoint
The SourceHut GraphQL API endpoint to use. The default is
.Lk https://git.sr.ht/graphql

.It Cm token
The SourceHut API token to use. Required.

This can either be a literal token or a path to a file containing the token.

.It Cm user_agent
The User-Agent string to use. The default is
.Dq Cm github-mirror/VERSION
where VERSION is the version of the program.

.It Cm owner
The owner of the repository to mirror. Required.

.El

.Pp
The options in the git section (not repeatable) are:
.Bl -tag -width -indent

.It Cm base
The base directory to mirror repositories into. The default is
.Pa /srv/git .

.El

.Sh FILES
.Bl -tag -width "/etc/github-mirror.conf" -compact
.It Pa /etc/github-mirror.conf
The
.Nm
configuration file.
.El

.Sh SEE ALSO
.Xr github-mirror 1 ,
.Xr git 1