Ssh clone not working after restoring production into qa

Hello team,

I have restored prod gitlab into qa, but ssh clone for our users not working. I have even restored the authorised keys. But still same issue. Authorised keys have git:git user:group and also 600 as permission.

Could someone please help here or provide any workaround

Thanks

What restore procedures did you use? Did you restore the /etc/gitlab/gitlab.rb and /etc/gitlab/gitlab-secrets.json from your old server? If not, then you should be, else you need to reset a lot of stuff to get it working.

Check the backup/restore docs here: Back up and restore GitLab | GitLab

Yes I have restored gitlab.rb and gitlab-secrets.json also. One more thing even for any new project. I have tried using ssh clone. Getting this error.

Command: ssh -T git@seut-glpapp1.int.tele2.com
Result: permission denied - public key

Command: git clone repository url(ssh)
Result: permission denied - public key
fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists.

Please help here

Does this potentially help? Ssh no longer works after restore - #2 by iwalker

Someone had a problem on restore, and it looks like they set the permissions for the authorized_keys file like suggested in my post and then it worked for them.

Thanks @iwalker it was resolved. Due to some permission in selinux. It was shown that error. Now we are able to clone using ssh.

Thanks for your suggestions

1 Like