Mirroring via SSH throws fatal error


I’ve created a repository on gitlab. I’ve master access. I’ve configured the repo and pushed changes to the repo. Then I created an ssh key and added the public key in the deploy keys section of the gitlab repository.

I’ve also added the private key to the config file inside ssh directory. But when i try to mirror the repo on my server I get the errors:

Mirroring though https works fine. I’ve already setup other projects on the same server using ssh mirroring with no issues. Struggling with this one.

Please advise.



Hi shahidiqbal,

Step 1:

The issue which you are facing is only come when you have updated gitlab or make any change in the gitlab config file. So in that case you need to run the reconfigure and restart command because sometime gitlab start misbehaving.

I request you to run the below command and share the output also.

to reconfigure the gitlab:
gitlab-ctl reconfigure

to restart the gitlab:
gitlab-ctl restart

Step 2:

After performing the step 1 perform the step 2:

The output which is share by you seems to be a DNS issue however I request you to post the output of the below command for further investigation.

to check the gitlab environment information(system information):
gitlab-rake gitlab:env:info

to check hostname of the machine:

verify hostname of machine:
cat /etc/hosts

to check url for gitlab:
cat /etc/gitlab/gitlab.rb | grep external_url

to check gitlab component:
sudo gitlab-ctl status

to check DNS on your machine and the machines you are testing your URL:
nslookup your domain name

to check the route:
traceroute your domain name

to check port is open for GitLab or not:
netstat -tlpn

to check selinux status:

to check any firewall enabled or not:
iptables --list

I hope the above step’s will help you.


1 Like

Hello akhilesh,

Thanks for your help.

I don’t have git-lab installed on my server. I just have git installed.


Hello shahidiqbal,

Ok you trying to say that you are cloning project from gitlab server to your local machine on which gitlab is not installed only git is present m’i right or you need to change on my understanding.

But i request you to please run all the command on gitlab (production/server) which i’ve already mention on the above response because it is very basic problem which always come in gitlab after the update of gitlab or make any change in gitlab conf file, it easily resolve by running all this command.

Please feel free to reply if you still have any query/problem.
I hope the above step will help you and resolve you problem.


Hello akhilesh,

The issue is resolved now. I created and deleted ssh keys several times and at last the issue resolved. As for the gitlab installation is concerned, I was not referring to my local machine. I was creating a mirror on my live server using this command “git clone --mirror git@gitlab.com:user/reponame.git”. Any how its resolved. Its strange how its resolved.