Git Product home page Git Product logo

git-mirror's Introduction

Gitlab Mirror

Gitlab Mirror will watch a GitLab group 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 GITLAB_PRIVATE_TOKEN environment variable a personal access token or your private token and execute git-mirror
export GITLAB_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

Any other fields are ignored

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

License

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

git-mirror's People

Contributors

bachp avatar bufferoverflow avatar

Watchers

James Cloos avatar Alexander Demushkane avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.