Key authorization via SSH does not work

SSH on server is running, password authentication is turned off and pubkey is turned on in the config file.

I create a key pair on Windows and add the public key to my user in the GitLab interface. I try to clone my newly created repository with the command

git clone git@

and get the message

Disconnected: No supported authentication methods availabe (server sent: publickey)


Can someone shed some light on this? Why does it work with putty but not through shell. Did I forget to set a variable?

Doesn’t gitlab uses it’s own ssh server? If you say it works with putty, it sounds like your logging into the server, yet you want to clone it. Those are i think 2 different things. Our server has port xxxx for gitlab, and port 22 for normal ssh. Make sure you have the right port. Other then that, i usually install git bash on windows, to run git bash gui. There i run ssh-keygen, then copy the .pub to gitlab and run a git clone too in that window to check if its all ok.

My bash shell on the client was wrongly setup… I thought I had checked everything and assumed there was a problem with the server config. I just reinstalled Git and this time selected the option to use OpenSSH and there weren’t any problems at all.

Thanks for your efforts anyway @riemers