@@ -7,65 +7,59 @@ as well as push to any git, http, https, or ssh repository. Additinally I have a
7
7
some features for populating metadata on cgit repositories that you can turn on if you
8
8
want.
9
9
10
- Currently windows is not supported due to the use of syscalls that aren't supported. If
11
- a windows user comes along who would like to use open a ticket and we can work something
12
- out.
13
-
14
- ## Features
15
-
16
- | Feature | Done| Kinda| Planned| Wishful|
17
- | --------------------------------------| :--:| :---:| :-----:| :-----:|
18
- | Clone repositories from github | X | | | |
19
- | Clone repositories from bitbucket | | | | X |
20
- | Clone repositories from gitlab | | | | X |
21
- | Push repo over http auth | X | | | |
22
- | Pull repo over http auth | X | | | |
23
- | Push repo over git protocol | X | | | |
24
- | Pull repo over git protocol | X | | | |
25
- | Push repo over SSH protocol | X | | | |
26
- | SSH user/pass auth | X | | | |
27
- | SSH private key auth | X | | | |
28
- | Pull repo over SSH protocol | X | | | |
29
- | Config validation | X | | | |
30
- | Prometheus metrics | X | | | |
31
- | Hot config reloading | X | | | |
32
- | Force syncing without process restart | X | | | |
33
- | Add unit tests | | | | X |
34
- | Add file watching for push repos | | | | X |
35
- | Populate some cgit metadata | X | | | |
10
+ This works on all OS but hot reloading of config on windows doesn't work.
36
11
37
12
## Config
38
13
39
- Here is an example config file. To validate your config you can run ` git-sync -validate -config file.yaml ` .
14
+ Here is an example config file with secrets replaced. To validate your config you can
15
+ run ` git-sync -validate -config file.yaml ` .
40
16
41
17
```
42
18
---
43
19
interval: 3600
44
20
path: /var/lib/repos
45
21
repos:
46
- - url: https://github.com/michaeljs1990/git-sync.git
22
+ - url: https://review.coreboot.org/coreboot.git
23
+ type: fetch_mirror
24
+ path: /var/lib/repos/mirrors/coreboot
25
+ extras:
26
+ cgitowner: coreboot
27
+ cgitsection: mirrors
28
+ metadata:
29
+ - cgit
30
+ - url: https://anongit.gentoo.org/git/repo/gentoo.git
31
+ type: fetch_mirror
32
+ path: /var/lib/repos/mirrors/gentoo
33
+ extras:
34
+ cgitowner: gentoo
35
+ cgitsection: mirrors
36
+ metadata:
37
+ - cgit
38
+ - url: https://github.com/michaeljs1990/collins-go-cli.git
47
39
type: push_mirror
48
- path: /var/lib/repos/git-sync
40
+ path: /var/lib/repos/xrt0x/collins-go-cli
49
41
httpauth:
50
- user: username
51
- token: sometoken
42
+ user: michaeljs1990
43
+ token: some-token
52
44
remote: github_mirror
53
- - url: ssh://[email protected] :repos/git-sync
54
- type: fetch_mirror
55
- path: /tmp/test_repo/test
56
- sshkeyauth:
57
- user: git
58
- keypath: ~/.ssh/id_rsa
59
- remote: mirror
60
45
github:
61
46
- username: michaeljs1990
62
47
httpauth:
63
- user: username
64
- token: sometoken
65
- protocol: http
48
+ user: michaeljs1990
49
+ token: some-token
66
50
repos: true
51
+ metadata:
52
+ - cgit
67
53
```
68
54
55
+ ## Sync Types
56
+
57
+ ` push_mirror ` - Push from the local path provided to the given URL to keep them in sync.
58
+
59
+ ` fetch_mirror ` - Pull from the url provided and place it at the provided path.
60
+
61
+ ` github ` - pull all repos located under the provided username to the top level path.
62
+
69
63
## Example
70
64
71
65
Run one time to test out your config
@@ -93,7 +87,6 @@ Validate your config
93
87
```
94
88
git-sync -validate
95
89
```
96
-
97
90
## Signals
98
91
99
92
You can reload the config file for your git-sync process with the use of usr1. This will validate
@@ -105,5 +98,27 @@ This will cause it to sync all repositories again that it knows about.
105
98
106
99
## Development
107
100
108
- Only tested with go 1.11
101
+ Test with golang 1.11 - 1.13
109
102
103
+ ## Feature List
104
+
105
+ | Feature | Done| Kinda| Planned| Wishful|
106
+ | --------------------------------------| :--:| :---:| :-----:| :-----:|
107
+ | Clone repositories from bitbucket | | | | X |
108
+ | Clone repositories from gitlab | | | | X |
109
+ | Add unit tests | | | | X |
110
+ | Add file watching for push repos | | | | X |
111
+ | Clone repositories from github | X | | | |
112
+ | Push repo over http auth | X | | | |
113
+ | Pull repo over http auth | X | | | |
114
+ | Push repo over git protocol | X | | | |
115
+ | Pull repo over git protocol | X | | | |
116
+ | Push repo over SSH protocol | X | | | |
117
+ | SSH user/pass auth | X | | | |
118
+ | SSH private key auth | X | | | |
119
+ | Pull repo over SSH protocol | X | | | |
120
+ | Config validation | X | | | |
121
+ | Prometheus metrics | X | | | |
122
+ | Hot config reloading | X | | | |
123
+ | Force syncing without process restart | X | | | |
124
+ | Populate some cgit metadata | X | | | |
0 commit comments