I have a gitlab account on my mac which has the neccessary ssh key on it for my work account. I am trying to set up gitlab for all my personal projects. I have created a personal account on gitlab and created a ssh key.
I have edited the config file in ~/.shh/ to look like this
Host markgameforeverything.gitlab.com
HostName gitlab.com
User git
PreferredAuthentications publickey
IdentityFile ~/.ssh/personal.pub
Host markbreadcreative.gitlab.com
HostName gitlab.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa.pub
however I am not able to
git pull
as I get this error
GitLab: The project you were looking for could not be found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists
if I type
ssh -T git@gitlab.com
I get
Welcome to GitLab, *my work account welcome*!
(the wrong account) Can anyone suggest any further steps I may take or see an error in my code?
Check how does your
.git/config
look like. I guess you don't have thereurl
starting withmarkbreadcreative.
andmarkgameforeverything.
prefixes.To get your setup working, you need to modify the lines in your repo from
to
respectively depending on which account you want to use. You can check your configuration using:
(should return different results). If not, post a verbose log from such commands (
ssh -vvvT git@markgameforeverything.gitlab.com
).