SSH key authentication still asks for credentials


I’m a long-time Github user currently migrating to Gitlab. I’d like to configure SSH key authentication so I don’t have to type in my username and password every time. So far I have a partial success. Here’s what I did so far.

My workstation is running Linux (OpenSUSE Leap 15.1). My main user is kikinovak. I’m already using SSH key authentication for all my remote servers.

[kikinovak@alphamule:~] $ tree ~/.ssh/
├── id_rsa
└── known_hosts

0 directories, 3 files

I copied/pasted my public key to Gitlab. The test seems to work:

[kikinovak@alphamule:~] $ ssh -T
Welcome to GitLab, @kikinovak!

But when I try to fetch my dummy test repository from Gitlab, I’m still getting asked for credentials:

[kikinovak@alphamule:~] $ git clone
Clonage dans 'toto'...
Username for '': 

What am I doing wrong here?

Cheers from the sunny South of France.

did you get this resolved?

Well, if you add an SSH key, it isn’t going to work over HTTPS like they tried above. If you want to clone via SSH:

git clone

since that is when SSH will be used, and therefore the SSH key uploaded to the account. If you want to use HTTPS, then you need to pass the username and better personal token to pass through instead of password obviously. Then it would be:

git clone

so it’s just a question of how you want to clone, SSH or HTTPS.