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

Viewed 22161

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?

1 Answers

The message "client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0" is not an error, it is a warning, and it is related to some ssh versioning issue. It used to be very common to receive from GitLab.

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.

Related