远程拉取私密出现报错
git clone git@github.com:<用户名>/<项目名>.git
Cloning into '<项目名>'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
在命令行输入ssh-keygen
ssh-keygen
会得到以下提示:
Generating public/private rsa key pair.
Enter file in which to save the key (/home/u1/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/u1/.ssh/id_rsa
Your public key has been saved in /home/u1/.ssh/id_rsa.pub
The key fingerprint is:XXXXXX(密钥)