Skip to main content


Yuanji's GitLab

You can find my GitLab account here: Yuanji Jiang · GitLab

Mirroring repositories

Repository mirroring

You can mirror a repository to and from external sources,

  • Push: for mirroring a GitLab repository to another location.
  • Pull: for mirroring a repository from another location to GitLab.
  • Bidirectional mirroring is also available, but can cause conflicts.

from Repository mirroring | GitLab


If choosing to mirror repositories from GitLab to GitHub via SSH with public key authentication, you need to:

  1. Input correct repository URL, for example, you should change from the first line(which you copy from GitHub) to the form of the second line.
    - [email protected]:masakichi/dotfiles.git
    + ssh://[email protected]:22/masakichi/dotfiles.git
  2. Copy GitLab's SSH public key to GitHub.
SSH public key

Each repository has its own SSH public key generated by GitLab, you need to add public key to GitHub multiple times if you want to mirror multiple repositories.