Git:Please make sure you have the correct access rights and the repository exists

1、首先我得重新在git设置一下身份的名字和邮箱
git config –global user.name “yourname”
git config –global user.email“your@email.com”
2.删除.ssh文件夹(直接搜索该文件夹)下的known_hosts
3.$ ssh-keygen -t rsa -C “your@email.com”
.ssh文件夹下生成id_rsa和id_rsa.pub 2个文件,复制id_rsa.pub的全部内容
4.打开https://github.com/,登陆你的账户,[设置]->[ssh设置],将第3步复制的内容粘贴在key中后提交。
5.ssh -T git@github.com

发表评论

电子邮件地址不会被公开。 必填项已用*标注