I'm unable to clone from a work github account repo. I have gone through the steps of generating an ssh key pair and uploading the public key to my work github account. I see with a verbose log clone GIT_SSH_COMMAND="ssh -vvv" git clone git@github.com:<workAccount>/repo.git
that the authentication succeeds with the public key. Therefore, I believe this is not an ssh auth problem.
But, when I run ssh -T git@github.com
, it reads:
Hi AlexanderBollbach! You've successfully authenticated, but GitHub does not provide shell access.
Now AlexanderBollbach
is the name of my personal github account, not my work github account. So it makes sense that I might get this error 'Could not read from remote repository.'
as my personal github account wouldn't have read privileges from my work github account.
My question is therefore, how can I associate this ssh cloning process with the right github account? In the reading I've gone on ssh, I've not understood any concept of how ssh could be associated with one github account versus another. I would greatly appreciate not just a fix but a proper understanding of how succeeding with the private/public key in this case just wasn't sufficient in cloning the repo.