I have used my office github account. But i was need to add my personal github account also. My office github account is dinukafrost
. My personal github account is dinuka
.
I did following steps.
- Create ssh keys. (I have already had ssh key for office account)
- Add public keys to github. (My office public key was added)
- Create ~/.ssh/config file.
My ssh keys.
id_ed25519_dinuka
id_ed25519_dinukafrost
id_ed25519_dinukafrost.pub
id_ed25519_dinuka.pub
My config file
PubkeyAcceptedKeyTypes=+ssh-rsa
# dinukafrost
Host github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519_dinukafrost
# dinuka
Host dinuka github.com
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_ed25519_dinuka
These command are given correct response.
➜ ssh -T git@github.com
Hi dinuka! You've successfully authenticated, but GitHub does not provide shell access.
➜ ssh -T git@dinuka
Hi dinuka! You've successfully authenticated, but GitHub does not provide shell access.
Now i can use my personal account with dinuka
host. eg - origin git@dinuka:dinuka/laravel_test.gi
But i can't use my office repos that i was using. eg - origin git@github.com:MyCompany/lp-service-registry.git
It is throwing following error
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
How can i fix this issue. Is any way to find any logs for fixing this?