aboutsummaryrefslogtreecommitdiff
path: root/Readme.md
blob: 4384d1d305422a3adf5ed26fa40832b479bc562d (plain)
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
# reposync

Scripts for juggling git repos

## gitwrapper.sh

gitwrapper.sh automatically creates repositories if they are pushed for the first time.
If a non-existent repo is pulled, an empty one is sent instead.

This allows for easy creation of new repos by just cloning any name, creating a first commit,
and then pushing.git@git:jonas/toybox.git

`gitwrapper.sh OPTIONS` is set as a command in `.ssh/authorized_keys`

#### Options

    gitwrapper.sh OPTIONS
    -r <DIR>	Allow pull from DIR
    -w <DIR>	Allow push to DIR
    -a <DIR>	Allow push/pull from/to DIR
    -i		Allow inetractive Login

## reposync.sh

This script handles synchronisation to GitHub via the GitHub API and SSH,
so it needs a valid API key and an authorized SSH key.
`~/settings.sh` provides `$USERNAME`, `$TOKEN` and `$REPO_DIR`.
If a repo only exists locally, it is created via the API, then pushed.
All repos present on both sides are pushed.
All remote-only repos are cloned.
The last behaviour is only intended for migrating, not for usage.
Repos are only pushed, never fetched so GitHub acts as a mirror and thus should be treated as read-only.

## License

MIT