Is it possible to mirror a private repository on using the SSH protocol? has an option to mirror other repository’s on their own site. (Project–> Project setting–> Mirror Repository)

But when I tried to do that using the ssh protocol, the authorization failed because the repository I wanted to clone didn’t recognize the public key of

  • .gitignore shows up when I run git status
  • Git Version Control in Emacs Code Browser
  • How come “git pull origin master” doesn't actually change the files in my computer's directory?
  • How do I squash two non-consecutive commits?
  • Build yeoman project from git checkout
  • Fatal error on “git add submodule”
  • The page stated:

    If your SSH repository is not publicly accessible, add the public SSH key of the GitLab server to the remote repository.

    The thing is, I could not find an option to add a private key to or download a public key from

    Is this only possible if your own a GitLab server or did I overlook something?

  • Git https:// repository not found though it exists
  • “Too many revisions” git message
  • git squash and preserve last commit's timestamp
  • Git merge of same and externally modified file
  • Github + Jenkins >> How to trigger build on “Commit and Push” in code repository?
  • Unable to checkout git submodule path
  • 3 Solutions collect form web for “Is it possible to mirror a private repository on using the SSH protocol?”

    Gitlab mirroring feature is implemented recently on Nov 2015 but unfortunately it is available only for Gitlab Enterprise Edition:

    Repository Mirroring (EE only) If you want to maintain a mirror of a
    repository in a GitLab instance, you can now let GitLab handle the
    mirroring for you automatically in GitLab Enterprise Edition.

    Check the features comparison between Community and Enterprise Editions
    Either you request EE or use gitlab-mirrors scripts:

    The gitlab-mirrors project is designed to fill in a feature which is currently missing from GitLab: the ability to mirror remote repositories.
    gitlab-mirrors creates read only copies of remote repositories in
    gitlab. It provides a CLI management interface for managing the
    mirrored repositories (e.g. add, delete, update) so that an admin may
    regularly update all mirrors using crontab. It operates by interacting
    with the GitLab API using python-gitlab3. Also, check out this cool
    puppet module for installing and configuring gitlab-mirrors.

    I’m not sure that this will work, but I reckon it’s worth a try. To retrieve the public key of, I ran the following command:

    nmap --script ssh-hostkey --script-args ssh_hostkey=all

    The following 3 public keys can then be found in the output:

    ssh-dss AAAAB3NzaC1kc3MAAACBAMPKInNPflcRle9F5Qt2j9aI0EZuWQzdXTbYvsl+ChaacqCOWRMiOmXHXqetFz6jD/6Fcqg20ZATxqSskQBaRn97O/mbH+GQk4d3zw9WAEURicE8rKJop3qGtdfFxLzrTuPAkKRDMmutT3hwZIOO8CFWOl1BiuUYTncJTeonrfAAAAFQCujauoy3Yy+ul72b/WsTECUPj9yQAAAIBIV2yyF7RZf7IYS8tsWcKP7Y5Bv9eFdbvbtsaxcFCHcmHIGoJQrIdPoueoOb5EUTYz0NgYKsKaZzDZkgFk28GsmLxKvhnPjaw0lJVSKRchEE5xVlamOlabiRMjQ7X/bAdejkBJe96AjZZL3UO4acpwfy3Tnnap0w6YCDeaxoyHpwAAAIAU+dyNaL3Hy15VIV32QwWMekvxeptUY/W03LNcgZZDoin87TE9xuQhM0qF3pi2i2a2ExuslgdttmYWvrbEz8eW+RFgvT5pKwWpalKWetHvtN3oYZP37ZIO1Y3Hd5A4YVcpYp1ccRayveLlCRwxb4HdGXT2OmYU+lmvimIR8zQ6A==
    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCsj2bNKTBSpIYDEGk9KxsGh3mySTRgMtXL583qmBpzeQ+jqCMRgBqB98u3z++J1sKlXHWfM9dyhSevkMwSbhoR8XIq/U0tCNyokEi/ueaBMCvbcTHhO7FcwzY92WK4Yt0aGROY5qX2UKSeOvuP4D6TPqKF1onrSzH9bx9XUf2lEdWT/ia1NEKjunUqu1xOB/StKDHMoX4/OKyIzuS0q/T1zOATthvasJFoPrAjkohTyaDUz2LN5JoH839hViyEG82yB+MjcFV5MU3N1l1QL3cVUCh93xSaua1N85qivl+siMkPGbO5xR/En4iEY6K2XPASUEMaieWVNTRCtJ4S8H+9
    _ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBFSMqzJeV9rUzU4kWitGjeR4PWSa29SPqJ1fVkhtj3Hw9xjLVXVYrU9QlYWrOLXBpQ6KWjbjTDTdDkoohFzgbEY=

    Adding these to your repository server might allow it to authenticate the connection properly.

    According to this comment, the key is in /var/opt/gitlab/.ssh/id_rsa and /var/opt/gitlab/.ssh/ by default. If the keys don’t exist, you can create them manually with sudo -u git -H ssh-keygen and mashing the enter key through the prompts.

    I just tried this on my gitlab-ee 8.7.2 installation and it appears to be working.

    Git Baby is a git and github fan, let's start git clone.