ssh - github permission denied(public key)
淡淡烟草味
淡淡烟草味 2017-05-02 09:32:16
0
2
815

Mac system
There is no problem at all when using the ssh -T git@github.com command

But when using git clone *** it prompts permission denied(public key)

id_rsa is also newly added to github by me

淡淡烟草味
淡淡烟草味

reply all(2)
迷茫

You should add the id_rsa.pub content to github
This is the public key

But it feels like it’s caused by other reasons

曾经蜡笔没有小新

Plan

1. First make sure this step is complete. (user.name user.email remains unchanged, the items in " " need to be changed)

$ git config --global user.name "Your Name"
$ git config --global user.email "email@example.com"

Pay attention to the --global parameter of the git config command. Using this parameter means that all Git repositories on your machine will use this configuration. Of course, you can also specify different user names and email addresses for a certain repository.

2. Create SSH Key, log in to GitHub, open the "Account settings", "SSH Keys" page, and add it.
Here is the link.
Remote warehouse SSH

3. Still not working, see below.

git clone ssh://github.com/username/repository.git 

The above usage format is wrong. It should be in the following format:

git clone ssh://git@github.com/username/repository.git

or,

git clone git@github.com:username/repository.git

Reference

Git tutorial English link

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template