I followed the instruction at https://help.github.com/articles/generating-ssh-keys and typing
ssh -T [email protected]
I get the message
Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.
When I try to clone a repository using ssh
git clone ssh://github.com/username/repository.git
I get
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
If I type
ssh-add -l
I see 3 keys one attached with my email address (k1) and other 2 inside ~/.ssh/id_rsa (RSA)
(k2 and k3).
the key k3 is the same of k1
if I type
ssh -vT [email protected]
everything is fine...the only line that makes me thinking is
debug1: Remote protocol version 2.0, remote software version libssh-0.6.0
debug1: no match: libssh-0.6.0
Go to github.com, click on your avatar and then "Settings". Find the "SSH and GPG keys" section on the left side and click on it. In the right pane, you'll see a list of SSH keys associated with your account. Each public key in this list grants the corresponding private key access to your repositories.
This error comes up when using a wrong private key or no key at all when trying to connect via SSH. To resolve the problem, you should generate a new key pair and connect using that new set of keys.
If you want to use a password to access the SSH server, a solution for fixing the Permission denied error is to enable password login in the sshd_config file. In the file, find the PasswordAuthentication line and make sure it ends with yes . Find the ChallengeResponseAuthentication option and disable it by adding no .
git clone ssh://github.com/username/repository.git
is wrong. You should be doing:
git clone ssh://[email protected]/username/repository.git
or better yet:
git clone [email protected]:username/repository.git
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