Trouble with ssh key

I’m having a lot of trouble uploading to GitLab from my Mac. My boss believes he has given me the necessary permissions, it’s a matter of SSH keys. Here’s what I’ve done:

  1. Freshly upload my SSH key (of the ssh-ed25519 variety) to GitLab. What shows in my profile matches what shows from

tr -d '\n' < ~/.ssh/

  1. Add the following to my .ssh/config:
IdentityFile ~/.ssh/id_ed25519
  1. Test:
`% ssh`
PTY allocation request failed on channel 0
Welcome to GitLab, @Joymaker2!
Connection to closed.
% ssh Permission denied (publickey).

I don’t know if the latter result was an expected result or a bad result. Is there something I’m missing here?

Hi Joymaker,

Firstly, .ssh/config matters about identation → so make sure IdentityFile is indented (1 tab) under Host.

Secondly, you’re testing it wrong xD You’re trying to ssh into the server itself, which of course doesn’t work.

From docs, proper test would be:

ssh -T

You don’t need to put your username, you’re authenticated by your keys.

If this works, your setup is correct.

So, all you need to do now is clone your project by using SSH link, which would look something like this:

git clone
1 Like

As @paula.kokic said, you use to connect over SSH - the key knows that it relates to your login in Gitlab. As I’ve quoted from your text above, the first test worked, since you correctly connected with - however your subsequent attempt with user: joymaker2 will not work and this is correct response for that.