Home > Mobile >  Gitlab: cannot create ssh key
Gitlab: cannot create ssh key

Time:07-15

I have this error when I add ssh-rsa key:

The form contains the following error: Key must be at least 4096 bits

To generate ssh-key (private and public) I execute ssh-keygen

Any idea how to solve my problem ?

Regards,

CodePudding user response:

For testing, you can use a passphrase-less key with, while specifying the number of bits in the key to create:

 ssh-keygen -t rsa -b 4096 -P "" -f ~/.ssh/gitlab

If you need to copy the public key to GitLab, use the ~/.ssh/gitlab.pub file content.

To test it, create a ~/.ssh/config file with:

Host gitlab
  Hostname gitlab.com
  User git
  IdentityFile ~/.ssh/gitlab

And ssh -Tv gitlab to check if you get a Welcome message, confirming you are properly authenticated.

  • Related