I have generated an id_ed25519 key on my server and set it in Gitlab, when I try to connect with SSH, I get the welcome message, but when using git pull, it's still requiring credentials (username and password).
$ ssh -T [email protected]
Welcome to GitLab, @john.doe!
$ git pull
Username for 'https://gitlab.com': john.doe
Password for 'https://[email protected]':
Already up to date.
What's missing in my configuration ?
Please check your configured remote, it should be the https one:
$ git remote -v
origin https://gitlab.com/john.doe/myproject.git (fetch)
origin https://gitlab.com/john.doe/myproject.git (push)
You'll want to change it to the SSH one:
$ git remote set-url origin [email protected]:john.doe/myproject.git
This does what OP mentioned in the comment of the accepted answer, without having to manually edit the config file. Please upvote the accepted answer before mine :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With