Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pulling from Git fails and gives me following error: client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

I am working on a project with my teammates. Some weeks ago, I pulled the project from git successfully. But today when I wanted to pull the updated project via the command "git pull origin <my_branch>", it gave me the following error:

client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

I have generated the public key using the command ssh-keygen and then pasted the content of the new generated file id_rsa.pub in the "Add an SSH key" section of Git, But the pull command did not work. Could somebody help me?

like image 707
Mohsen Arab Avatar asked May 05 '21 12:05

Mohsen Arab


1 Answers

You forgot to tell us which git provider you are using.

I bet you are using GitLab.

The message "client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0" is being received from GitLab nowadays, is not an error, it is a warning, and it is related to some ssh versioning issue that GitLab is currently experiencing.

If you want it to go away, you can make sure that your ~/.ssh/config contains the following:

Host gitlab.com     UpdateHostKeys no 

However, if you are in fact being prevented from pulling, then this bad signature warning is probably not the reason. Once you make the warning go away, you will still have to find the real problem that you have, about which we know nothing, as the question stands right now.

like image 68
Mike Nakis Avatar answered Sep 17 '22 16:09

Mike Nakis