简体   繁体   中英

problem on adding ssh key to github - permission denied

I generated the SSH key using the command: $ ssh-keygen , It prompted for a filename and phrase, which I provided and generated the corresponding file. Then from github.com I added the SSH key from settings>SSH and GPG keys where I pasted the key in the generated file. Then I hit the command $ ssh -T git@github.com in the terminal which gave me a : Permission denied (publickey). message. What does this message mean and why am I getting this? Previously I didn't have trouble with this.

where I pasted the key in the generated file.

Make sure it was:

  • the id_rsa.pub file, meaning the public key (not the private one)
  • the public key pasted as one continuous line (not multiple lines)

Check also you have added your private key to the ssh-agent . (in order to not enter the passphrase every time)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM