原因是检查本地没有SSH Key存在

1.首先为系统设置github的用户名和自己的邮箱

git config --global user.name "****"
git config --global user.email "****@xxx.com"

2.生成ssh key,邮箱填刚才设置的邮箱

ssh-****** -t rsa -C "****@xxx.com

之后显示:

Generating public/private rsa key pair.

Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):

可以全部按回车选择默认选项

3.打开.ssh文件夹下的id_rsa.pub 复制其内容

4.进入自己的github账户,打开设置

ubuntu使用git clone:“Please make sure you have the correct access rights and the repository exists.”

5.选择SSH and GPG keys选项

ubuntu使用git clone:“Please make sure you have the correct access rights and the repository exists.”

6.选择New SSH key

ubuntu使用git clone:“Please make sure you have the correct access rights and the repository exists.”

7.将刚才文件里的内容复制入框并点击add SSH key

ubuntu使用git clone:“Please make sure you have the correct access rights and the repository exists.”

8.在ubuntu中执行

ssh -T [email protected]

 

相关文章: