I sent a 3rd party my public SSH key, which they used to add access for me to a particular repository. However, when I try to git clone, I get errors (in fact, I'm asked for a password).
I've run into issues before when what I thought was my public key, wasn't in fact the public key used by my git client. My question:
How do I verify which SSH key my git client uses?
>ssh [email protected] info
[email protected]'s password: <--- this shouldn't happen
You can use an ~/.ssh/config
file in order to specify the exact hostname, user and private key you want to use:
Host wpengine
user git
hostname git.wpengine.com
IdentityFile ~/.ssh/myPrivateKey
That way, there is no ambiguity as to which key is used.
ssh -vvvT wpengine
That command will tell you what is happening.
Usually, the public key is incorrectly added to the ~/.ssh/authorized_keys
in the server side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With