All Projects → bachp → Git Mirror

bachp / Git Mirror

Licence: mit
A small utility that allows to mirror external repositories to GitLab, GitHub and possible more.

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Git Mirror

Beetle
Shake to create Bug Report on GitHub, GitLab and Azure DevOps!
Stars: ✭ 45 (-31.82%)
Mutual labels:  gitlab
Repo Lockdown
GitHub Action that immediately closes and locks issues and pull requests
Stars: ✭ 56 (-15.15%)
Mutual labels:  mirror
Packagist Mirror
Alibaba Cloud Packagist Mirror
Stars: ✭ 63 (-4.55%)
Mutual labels:  mirror
Local Npm
Local and offline-first npm mirror
Stars: ✭ 1,040 (+1475.76%)
Mutual labels:  mirror
Git Req
Check out merge requests from your GitLab/GitHub hosted repositories from the command line with just the request number.
Stars: ✭ 50 (-24.24%)
Mutual labels:  gitlab
Gitlab Search
Command line tool to search for contents in GitLab repositories
Stars: ✭ 60 (-9.09%)
Mutual labels:  gitlab
Zeit
Qt frontend to at & crontab CLI utilities
Stars: ✭ 42 (-36.36%)
Mutual labels:  mirror
Glab
An open-source GitLab command line tool bringing GitLab's cool features to your command line
Stars: ✭ 1,126 (+1606.06%)
Mutual labels:  gitlab
Gitlab Notifications
👍 Notifications Center for GitLab
Stars: ✭ 55 (-16.67%)
Mutual labels:  gitlab
Pkgmirror
Packages Mirroring
Stars: ✭ 62 (-6.06%)
Mutual labels:  mirror
Gitlab.visualstudio
GitLab Extension for Visual Studio
Stars: ✭ 48 (-27.27%)
Mutual labels:  gitlab
Homemirror
Web based home mirror, inspired by Hannah Mitt's project.
Stars: ✭ 49 (-25.76%)
Mutual labels:  mirror
Kira
🐿 Project management framework with deep philosophy underneath
Stars: ✭ 61 (-7.58%)
Mutual labels:  gitlab
Kdtool
Kubernetes deployment utility
Stars: ✭ 47 (-28.79%)
Mutual labels:  gitlab
Kubernetes Learning
《从Docker到Kubernetes进阶课程》在线文档
Stars: ✭ 1,128 (+1609.09%)
Mutual labels:  gitlab
Netrw
Mirror of Dr. Chip's netrw vim plugin for vundle
Stars: ✭ 44 (-33.33%)
Mutual labels:  mirror
Templeos
Talk to God on up to 64 cores. Final snapshot of the Third Temple.
Stars: ✭ 1,089 (+1550%)
Mutual labels:  mirror
Psgitlab
An interface for administering GitLab from the PowerShell command line.
Stars: ✭ 65 (-1.52%)
Mutual labels:  gitlab
Aircast Ios
aircast iOS SDK --- airplay screen mirror receiver iOS8-iOS11.3 support
Stars: ✭ 64 (-3.03%)
Mutual labels:  mirror
Xn resource editor
💫 Unofficial mirror of XN Resource Editor v3.0.0.1.
Stars: ✭ 61 (-7.58%)
Mutual labels:  mirror

Git Mirror

Git Mirror will watch a GitLab or GitHub groups and keep it in sync with external git repositories.

Usage

  1. Create group on your gitlab instance or gitlab.com. e.g. mirror-test
  2. Add a repository you like to sync to. e.g my-project
  3. Add a description to the project in YAML format containing an origin field. e.g. origin: https://git.example.org/my-project.git
  4. Execute set the PRIVATE_TOKEN environment variable a personal access token or your private token and execute git-mirror
export PRIVATE_TOKEN="<personal-access-token>"
git-mirror -g mirror-test

This will sync the group mirror-test on gitlab.com. If you want to sync a group on a different GitLab instance, use the -u flag.

git-mirror -g mirror-test -u http://gitlab.example.org

Multiple concurrent jobs

git-mirror allows to execute multiple mirror jobs in parallel using the -c <n> flag.

git-mirror -g mirror-test -c 8

This will execute at most 8 sync jobs in parallel

Description format

For git-mirror to mirror a repository it needs to know where to sync from. In order to achive this git-mirror expects the description field of a mirrored project to be valid YAML with at least an origin field.

origin: https://git.example.org/my-project.git

A list of currently supported fields

  • origin Source repository to mirror from
  • skip Temporarily exclude a project from syncing by adding skip: true
  • destination Reserved for future use
  • refspec Push only refspec. Add the refspec list to use it. Any valid refspec is possible. E.g.
    refspec: ["master", "2.0", "+refs/tags/*:refs/tags/*"]
    
    See also https://git-scm.com/book/en/v2/Git-Internals-The-Refspec

Any other fields are ignored

Mirror to GitHub

git-mirror also supports mirroring to GitHub.

This can be done by specifying GitHub as provider:

export PRIVATE_TOKEN="<personal-access-token>"
git-mirror -g mirror-test -p GitHub

This has been tested against github.com but it might also work with on premise installations of GitHub.

Docker

There is also a docker image available. It can be used as follows:

docker run -e PRIVATE_TOKEN="x" bachp/git-mirror git-mirror -g mirror -u http://gitlab.example.com

Building & Installing

In order to build this project you need a least rust v1.18.0. The easiest way to get rust is via: rustup.rs

The project can be built using cargo

cargo build

They're using Git Mirror

License

This project is licensed under the MIT License - see the LICENSE file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].