git clone时遇到的问题:Please make sure you have the correct access rights and the repository exists.

clone github代码时碰到的问题,查了下报错是ssh key有问题

1.重新设置下 自己的github名字和邮箱:

git config --global user.name 'github.name'

git config --global user.name '[email protected]'

2.删除.ssh下的known_hosts文件,手动删除即可

3.输入git命令

ssh-keygen -t rsa -C "[email protected]"

会出现

Generating public/private rsa key pair.

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

将该文见的内容复制到github的ssh key

4.添加ssh key

5.在git 中输入命令

ssh -T [email protected]

会跳出很多提示, 输入yes即可

会有提示成功的信息

代码提交前要git  pull,不然容易出错,即使是最新代码?

至此问题解决,感谢万能的网友

发布了9 篇原创文章 · 获赞 0 · 访问量 220

猜你喜欢

转载自blog.csdn.net/mlh532354163/article/details/95546279