I have a dual setup running between my own local machine (OSX) and an Ubunto VM running on Azure. I develop locally and push to a company Gitlab account using a ssh key that has my personal credentials. On the Ubunto VM, I have another company based ssh key with different credentials. Both keys have been added to Gitlab.
When I push/pull/clone from my local machine, it works great. No problems.
When I try to push/pull/clone from my Ubunto VM, I get an error:
Cloning into 'testproject'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
But, when I run
ssh -T email@example.com I get a welcome message, which, if I’m correct, indicates that the keys are setup correctly?
~/.ssh/config looks like this on my Ubunto VM:
Host gitlab.com RSAAuthentication yes IdentityFile /home/username/.ssh/id_rsa
.git/config looks like this:
[core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [remote "origin"] url = firstname.lastname@example.org:username/testproject.git fetch = +refs/heads/*:refs/remotes/origin/* [user] name = username email = email@example.com
Any input would be appreciated!