[Solved] Git Error: client_global_hostkeys_private_confirm: server gave bad signature for RSA key 0

Error message:

client_ global_ hostkeys_ private_ confirm: server gave bad signature for RSA key 0

Client \ global \ host key \ private \ confirm: the server provided the wrong signature for RSA key 0

When I submit git using the following instruction

git add .
git commit -m 'feat :Push'
git push origin

Solution:

Scheme 1: make sure your ~ /. SSH/config contains the following:

Host gitlab.com
UpdateHostKeys no

Scheme 2: try regenerating the public-private key

Read More: