Fail to configure ssh : permission denied (public key)

I’m confused about setting up the ssh access to my gitlab profile. I was following the tutorial here . I already have an existing pair of keys (created a few months ago in order to connect to a cluster) so i directly went to this part of the tutorial.

The issue occurs to the next part, “Verify that you can connect” when I type
ssh -T

The first time I had the message where i needed to enter ‘yes’, followed by a permission denied. Since then, I get the message Permission denied (publickey).

When I try with I get the message ssh: Could not resolve hostname Name or service not known

The issue is similar to other topics on the forum, but the suggested solutions do not seem suited, I already have all the requested permissions on the .ssh directoy and the files inside…



You need to provide git as the username:

[ian@elise ~]$ ssh -T
Welcome to GitLab, @iwalker!

so - yours was without git, so it would attempt to connect using the username of your account on Linux.

Working ! Thanks. This part is quite unclear in the tutorial.

1 Like