Git@gitlab.com: Permission denied (publickey,keyboard-interactive) in last days without reason

I’ve been using GitLab from a couple of years without issues, but from last week it started to reject the connection when I try to push a commit with the error message:
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
I didn’t change my ssh key, and it happens to both my desktop and my laptop (with 2 different key obviously). Sometime I have to try several times and it finally work, today it doesn’t work at all.
It seems no one else is suffering this problem, I don’t really understand what happened?!

1 Like

It’s such a relief seeing someone else having this same issue! I thought I was going crazy! Intermittent fails and today stopped working completely, I cannot run a simple “pull” from my repo anymore.

1 Like

Me too!

ssh -Tv git@gitlab.com shows:

debug1: Offering public key: /home/daryll/.ssh/id_rsa RSA SHA256:HASH agent
debug1: send_pubkey_test: no mutual signature algorithm

I worked around it by doing ssh-keygen -t ed25519 and adding that new public key to gitlab. That key allowed my pulls to work.

Seems like something broke.

1 Like

Looks like the Fedora bug with the workaround mentioned at:

1 Like

Thanks, I solved by installing this upgrade
https://bodhi.fedoraproject.org/updates/FEDORA-2020-413ab3bca3

Now it works correctly.

2 Likes

For reference, I’m a Fedora user as well. The change to the ssh config allows the RSA key to work.

I have the same problem on macOS Catalina.

1 Like

Can also confirm issue occurs on Catalina and Big Sur with RSA and ED25519 keys

I have the same issue

1 Like

Same issue here, macos Big Sur.

Same issue on Ubuntu-20.04-i3wm.
I’m using GitLab with a passphrase.

If I’m on GNOME-Desktop, it works.
If I’m on i3wm-Desktop → Permission denied (publickey,keyboard-interactive)

Edit:
Fun fact - If I set up a completly new SSH-Key on i3, GitLab says:
Permission denied (publickey,keyboard-interactive)
:'D crap of the day…

1 Like

SOLVED !

After days and hours I get it!
It’s really weird!

I’m on Ubuntu 20.04
On my GNOME desktop I’ve put the following data in ~/.ssh/config

Host NameOfMyPublicKey
	User MyGitLabUserName
	Hostname gitlab.com
	IdentityFile ~/.ssh/id_rsa.NameOfMyPublicKey

This works all the time without any problems.
Then I’ve installed i3wm and everytime I’ve tried to push or pull, this message comes up:

...
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
...

Now I’ve changed the data in ~/.ssh/config to:

Host gitlab.com
	User MyGitLabUserName
	Hostname gitlab.com
	IdentityFile ~/.ssh/id_rsa.NameOfMyPublicKey

…and !BAM! now it works on GNOME and i3wm!

I hope this helps some people out there to solve the problem!

2 Likes

SOLVED too!!
I just added a public and private keys into my .ssh folder

~/.ssh/id_rsa (My private key file)
~/.ssh/id_rsa.pub (My public key file)

I’m on Ubuntu 20.04 and my solution may be obvious but could help someone else.

When we create a gitLab account and configure our ssh access keys, they are needed to do “push”, so when I moved to another computer I didn’t realize that until I copy the ssh keys files from my older desktop to my new notebook, than everything worked perfectly.

*Just clearing things up, the recommended solution in this case is create a new pair of public and private keys for each computer, we can do it in gitLab configuration.

Finally, I have found something which helped me. Many thanks!

or you just take the https:// … login
like that : git remote add origin https://g

I use Arch with i3wm and had the same problem and solved with these 2 lines:

eval $(ssh-agent -s)
ssh-add ~/.ssh/id_ed25519

prompted for passphrase, I entered it and it works. This is how you can check if your ssh connection works: ssh -T git@gitlab.com or for github ssh -T git@github.com

1 Like

this may be trivial but make sure you have correct rights for you id_rsa (ex: 600)