Gitlab Sshkey Issue

Sat May 7, 2022

1 minutes

Last updated: 2022-05-07

Always asking for password when connect to GITLAB with SSH key

Background :

  • Gitbash used 2.35.1.2
  • Gitlab CE 13.8.x

Problem :

Generate SSH pair keys under GITBASH, then add the public SSH key to GITLAB profile.

When connect to GITLAB with generated private SSH key, GITLAB asked the password, it means that the SSH keys configured doesn’t work.

Issue found :

SSH key generated by default with RSA algorithm, this algorith is deprecated since GITLAB 11.0.

Preferred to use ED25519 algorithm, or your can use ECDSA algorithm. algorithm.

Debug Diagnostic Tools used:

ssh -vvvv will show all information hidden, while connecting to GITLAB through SSH.
debug1: send_pubkey_test: no mutual signature algorithm ← ssh-rsa is not enabled

RSA algorithm is deprecated for security vulnerability reason.

If you want to re enable RSA, try to add following lines in your client config file :

PubkeyAcceptedKeyTypes +ssh-rsa