I'm currently trying to access GitHub to clone a repository with SSH.
However, when I enter the url to clone, the server hangs after Initialized empty Git repository in /export/home/nathan/myrepo
, as follows:
$ git clone [email protected]:v6/myrepo.git
Initialized empty Git repository in /export/home/nathan/myrepo/.git/
ssh-add -l
shows multiple identities.
2048 <fingerprint> /home/vagrant/.ssh/id_rsa (RSA)
2048 <fingerprint> production-infrastructure.pem (RSA)
I have added the public keys for both of the above to my GitHub account.
However, when I attempt ssh -T [email protected]
, I get something like the following:
Hi otheruser1998! You've successfully authenticated, but GitHub does not provide shell access.
I am not otheruser1998
.
I think GitHub may associate the production-infrastructure.pem
key with otheruser1998
, whose account already has this key.
How do I disable the production-infrastructure.pem
key from ssh-agent
?
If that doesn't work, can I specify a key for git to use?
As both of these keys are forwarded from my local development machine, I cannot just specify my key file in ~/.ssh/config
, as a popular answer to How to tell git which private key to use? recommends.
Neither can I use ssh-add -d production-infrastructure.pem
to remove the key, as, again, it requires one to specify the local path to a key file: http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man1/ssh-add.1
The question title seems a little clunky. Please edit. I'll take any help I can get to make it clearer. However, the ultimate goal is to end the situation that makes me run into that silent git clone
bug, clone my repository, and move on with life.