Skip to content

Commit 2e245b6

Browse files
committed
Update README change description config key
1 parent f7037ea commit 2e245b6

File tree

3 files changed

+61
-46
lines changed

3 files changed

+61
-46
lines changed

README.md

+58-43
Original file line numberDiff line numberDiff line change
@@ -7,65 +7,59 @@ as well as push to any git, http, https, or ssh repository. Additinally I have a
77
some features for populating metadata on cgit repositories that you can turn on if you
88
want.
99

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.
3611

3712
## Config
3813

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`.
4016

4117
```
4218
---
4319
interval: 3600
4420
path: /var/lib/repos
4521
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
4739
type: push_mirror
48-
path: /var/lib/repos/git-sync
40+
path: /var/lib/repos/xrt0x/collins-go-cli
4941
httpauth:
50-
user: username
51-
token: sometoken
42+
user: michaeljs1990
43+
token: some-token
5244
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
6045
github:
6146
- username: michaeljs1990
6247
httpauth:
63-
user: username
64-
token: sometoken
65-
protocol: http
48+
user: michaeljs1990
49+
token: some-token
6650
repos: true
51+
metadata:
52+
- cgit
6753
```
6854

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+
6963
## Example
7064

7165
Run one time to test out your config
@@ -93,7 +87,6 @@ Validate your config
9387
```
9488
git-sync -validate
9589
```
96-
9790
## Signals
9891

9992
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.
10598

10699
## Development
107100

108-
Only tested with go 1.11
101+
Test with golang 1.11 - 1.13
109102

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 | | | |

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ type Extras struct {
7676
Username string `json:"username"`
7777
CgitSection string `json:"cgitsection"`
7878
CgitOwner string `json:"cgitowner"`
79-
Description string `json:"description"`
79+
Description string `json:"cgitdescription"`
8080
}
8181

8282
// RepoConfig is for adhoc servers that may not live

schema.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@ var schema = `
6868
"type": "string",
6969
"title": "The Cgitowner Schema"
7070
},
71-
"description": {
71+
"cgitdescription": {
7272
"$id": "#/properties/github/items/properties/extras/properties/description",
7373
"type": "string",
74-
"title": "The Description Schema"
74+
"title": "The Cgitdescription Schema"
7575
}
7676
}
7777
},

0 commit comments

Comments
 (0)