GitHub clone to local SSH permission issue

 GitHub clone to local SSH permission issue

The reason why the computer cannot be cloned from GitHub to the local computer is because of the ssh permission problem. First, open the terminal and enter ls -al ~/.ssh in the terminal to check whether there is a local .ssh file.


Generate a new SSH key if it doesn't exist

Paste the text below, substituting your GitHub email address.

ssh-keygen -t rsa -b 4096 -C“ [email protected] ”

This will create a new ssh key, using the provided email as a label.

Generate a public/private key rsa key pair.

When prompted for the file in which to save the key, press Enter. This accepts the default file location.

Enter the file where you want to save the key (  /Users/you/.ssh/id_rsa  ): [press enter]

Enter a secure password at the prompt. See "Using SSH Key Passwords" for more information .

Enter password (empty password): [ Enter password] Enter the same password again : [ Enter passphrase again ]

This password will be used when you submit the project. If it is empty, it will not be entered when submitting the project.


If there is a switch to the desktop command + shift + G enter ~, enter the root directory, view the .ssh file, because .ssh is a hidden file, view the hidden file terminal input defaults write com.apple.finder AppleShowAllFiles -bool true; KillAll Finder; this way You can see the .ssh file,

Right-click id_rsa.pub and open it with Notepad, copy it, open the GitHub of the webpage, log in,

Click on the avatar, click on Settings,


title可以随便填,然后把复制的秘钥放到里面就OK了,然后你就可以任性的clone GitHub中的项目了

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324795931&siteId=291194637