I just configured Gitlab with a deploy key so that it doesn't ask for a username and password every time—but when pulling, it still fails with the following error:
git@gitlab.com: Permission denied (publickey, keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What I did so far is this:
- Generated the SSH key that can be found under
~/.ssh/ - Copied and pasted
id_rsa.pubin the Gitlab deploy keys section - Added the key to the SSH registery with
ssh-add ~/.ssh/id_rsa - Setup a config file under
~/.sshwith following contents:Host gitlab.co RSAAuthentication yes IdentityFile ~/.ssh/id_rsa - Changed the
git remotefrom the one using HTTPs to the one using SSH.
I searched both Google and StackOverflow for a possible solution, but didn't find any similar discussion. Any ideas what I may be missing?