GitLab Github Mirror Repo
This is a simple Python cli script will first create a new repo on Gitlab and Github. Then it will create a push mirror link between them. Where all changes on the Gitlab repo are pushed to the Github repo (Gitlab -> Github).
Usage
To use this script you will need to have an access token for both Gitlab and Github, both must have permissions to create new repositories on your behalf.
gitlab_github_mirror_repo -l "xxxx" -h "xxx" -u https://gitlab.com -r test123
pip install gitlab-github-mirror-repo
gitlab_github_mirror_repo --help
Usage: gitlab_github_mirror_repo [OPTIONS]
A Python script used to mirror repos.
- Options:
- -l, --gitlab-private-token TEXT
Private GITLAB token, used to authenticate when calling the Gitlab API. [required]
- -u, --gitlab-url TEXT
The GitLab URL i.e. gitlab.com. [required]
- -h, --github-private-token TEXT
Private GITHUB token, used to authenticate when calling the Github API. [required]
- -r, --repo-name TEXT
The name of the repository on Github and Gitlab. [required]
- --help
Show this message and exit.
Docker
You can also use the Docker image like:
docker run gitlab-github-mirror-repo -l "xxxx" -h "xxx" -u https://gitlab.com -r test123
Predefined Variables
Please note some of the arguments can be filled in using environment variables.
If --gitlab-private-token is not set the script will look for the ENV variable GITLAB_PRIVATE_TOKEN
If --github-private-token is not set it will look for for the ENV variable GITHUB_PRIVATE_TOKEN
Setup Development Environment
git clone git@gitlab.com:gitlab-automation-toolkit/gitlab-github-mirror-repo.git
cd gitlab-github-mirror-repo
pip install tox
make install-venv
source .venv/bin/activate
make install-dev
Changelog
You can find the changelog here.
Metadata
Release files for gitlab-github-mirror-repo 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| gitlab-github-mirror-repo-0.1.1.tar.gz | 3.7 kB | Without provenance | Details |
Release files / gitlab-github-mirror-repo-0.1.1.tar.gz
| Download URL | gitlab-github-mirror-repo-0.1.1.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f530c6c7e33d4828a0ab23462ccebdfe61b6364c7baad980a57ed593047122ed
|
|
BLAKE2b-256 checksum How to use checksums |
3527f2a93127fa24a84ee15559279c2b9a38de7f5d49daeb1e538466c8a6b7c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3
|
Security for gitlab-github-mirror-repo 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.