synchronise GitLab repositories
Project description
gitlab-sync
This provides the gitlab-sync tool which clones GitLab and updates repositories.
Config
You will need to have SSH access configured for GitLab, and have created a personal access token with API access.
The config goes in ~/.config/gitlab-sync.toml
or ~/.gitlab-sync.toml
,
which is TOML.
["~/team-x"]
access-token = "9koXpg98eAheJpvBs5tK"
# you can see the paths of groups from the URL on GitLab
paths = [ "path/to/team-x" ]
# strip the common prefix from the given path
strip-path = true
strategy = "mirror"
["~/gitlab"]
# get the gitlab access token from running a command
access-token = ["pass", "GitLab/api-access-token"]
# paths to clone from GitLab, can include slashes for groups/projects
paths = [ "mintel", "obristow" ]
strategy = "mirror"
Usage
$ gitlab-sync local-update
Strategies
You have to define a strategy for each local copy you define in config, the strategy defines what will happen when gitlab-sync runs over the given copy.
mirror
- delete repositories which no longer exist remotely
- move repositories which have been moved remotely
- update local repositories
- clean local repositories (prune+gc)
- clone new repositories
This is good for having a local copy which you can use to perform searches
in using something like ag
.
The local copies should not be modified by users.
To do
- flesh out integration tests
- cater for new repositories being made locally and pushed remotely
- compare (toasted-)marshmallow as a replacement for attr+voluptious - marshmallow uses attr
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gitlab-sync-0.2.7.tar.gz
(13.7 kB
view hashes)
Built Distribution
Close
Hashes for gitlab_sync-0.2.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03d4014c90e1dab8485b991981132c84c90b603c531f1fdff569151bded79349 |
|
MD5 | fadefb2c927305620554c6e768d03d58 |
|
BLAKE2b-256 | ec95e8813a237f1783a0166fae066536ff54e496e8bc4adbb92a19cd776c8d7f |