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
迷茫2017-05-02 09:34:16
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
曾经蜡笔没有小新2017-05-02 09:34:16
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
Git tutorial English link