Help using SSH to log in to gitlab

Hello,
I do not know if this is the correct place to ask. I am just starting to use GitLab. I have an iMac running 11.6 with all system updates. In my Terminal program, I have git version 2.30.1 (Apple Git-130). I created an ssh rsa key and added the public key to my GitLab account. The fingerprints in GitLab match the fingerprints saved on my computer. My username is KarlJenkinson, but my first project lives at https://gitlab.com/karljenkinson1/learn-gitlab.
I am working through the “Use Gitlab” docs. I am at:
GitLab and SSH keys | GitLab

When I try to log in using ssh, I get this error:
karljenkinson@KarlsiMac usr % ssh -T KarlJenkinson@gitlab.com
KarlJenkinson@gitlab.com: Permission denied (publickey,keyboard-interactive).

I tried using -Tvvv and all I see is the rsa authentication failed.

debug3: load_hostkeys: loaded 1 keys from 2606:4700:90:0:f22e:fbec:5bed:a9b9
debug1: Host ‘gitlab.com’ is known and matches the ECDSA host key.
debug1: Found key in /Users/karljenkinson/.ssh/known_hosts:1
debug3: send packet: type 21
debug2: set_newkeys: mode 1
debug1: rekey out after 134217728 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug3: receive packet: type 21
debug1: SSH2_MSG_NEWKEYS received
debug2: set_newkeys: mode 0
debug1: rekey in after 134217728 blocks
debug1: Will attempt key: /Users/karljenkinson/.ssh/id_rsa RSA SHA256:<I deleted fingerprint>
debug1: Will attempt key: /Users/karljenkinson/.ssh/id_dsa
debug1: Will attempt key: /Users/karljenkinson/.ssh/id_ecdsa
debug1: Will attempt key: /Users/karljenkinson/.ssh/id_ed25519
debug1: Will attempt key: /Users/karljenkinson/.ssh/id_xmss
debug2: pubkey_prepare: done
debug3: send packet: type 5
debug3: receive packet: type 7
debug1: SSH2_MSG_EXT_INFO received
debug1: kex_input_ext_info: server-sig-algs=<ssh-ed25519,ssh-rsa,rsa-sha2-256,rsa-sha2-512,ssh-dss,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521>
debug3: receive packet: type 6
debug2: service_accept: ssh-userauth
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug3: send packet: type 50
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive

debug1: Offering public key: /Users/karljenkinson/.ssh/id_rsa RSA SHA256:<I deleted fingerprint>
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey,keyboard-interactive
debug1: Trying private key: /Users/karljenkinson/.ssh/id_dsa
debug3: no such identity: /Users/karljenkinson/.ssh/id_dsa: No such file or directory
debug1: Trying private key: /Users/karljenkinson/.ssh/id_ecdsa
debug3: no such identity: /Users/karljenkinson/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /Users/karljenkinson/.ssh/id_ed25519
debug3: no such identity: /Users/karljenkinson/.ssh/id_ed25519: No such file or directory
debug1: Trying private key: /Users/karljenkinson/.ssh/id_xmss
debug3: no such identity: /Users/karljenkinson/.ssh/id_xmss: No such file or directory

What am I doing wrong? What can I check? I have tried googling many different ways to ask this question, and either they tell me to create an ssh key, or they assume I can log in already.

Regards,
Karl Jenkinson

It should be

ssh git@gitlab.com

Not username@gitlab.com

The docs show this in the verify section: GitLab and SSH keys | GitLab

Hello iwalker,

Thank you. I am closer; I just need to figure out why my passphrase is not working.

What the docs say is:

Open a terminal and run this command, replacing gitlab.example.com with your GitLab instance URL:

Where do they tell my what my gitlab instance URL is?

Regards,
Karl

If you are using gitlab.com then https://gitlab.com is your instance url. If you are running your own installation of Gitlab on your own server, then this is what you configured in gitlab.rb as the external_url.

If you uploaded an SSH key to gitlab.com then a passphrase shouldn’t be used, unless you set a password when creating your SSH key, then you need to use whatever that was.

Yes, I did set a password. I tend to err on the side of being secure. Thank you for the explanation. I read this reply second, but I will start over with reading the documentation and try not to bother you more :smiley:

Thank you for your assistance.
Regards,
Karl