git clone 时间出现 Please make sure you have the correct access rights and the repository exists

[复制链接]
发表于 2026-4-8 07:49:49 | 显示全部楼层 |阅读模式
Please make sure you have the correct access rights and the repository exists
请确保您具有精确的访问权限而且存储库存在
标题形貌:
输入 git clone 下令时出现Please make sure you have the correct access rights and the repository exists.错误,
出现这个标题的缘故起因是git服务器没有存储当地ssh密钥
办理步调:
1.删除 .ssh 文件夹 C:\Users\Administrator\.ssh ,假如大概找不到Administrator,删除 C:\Users\(当地用户名)\.ssh 中的 known_hosts
2. 运行bash.exe,在下载好的Git中的bin目次下,根据你的Git按照目次来找,打开bash.exe输入下令ssh-keygen -t rsa -C "username" (注:username为你git上的用户名),假如实行乐成,会返回:   
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa): //这里的username是电脑上的用户名,这个地点也是文件的存储地点,然后按回车,
假如从前有存储地点会返回/Users/your username/.ssh/id_rsa already exists.Overwrite (y/n)?直接输入y回车。
假如从前没有储存地点就会出现Enter passphrase(empty for no passphrase);也直接回车,
两种情况回车后都会出现 Enter same passphrase again 然后接着回车会体现

3. 然后找到体系主动在.ssh文件夹下天生两个文件,id_rsa和id_rsa.pub,用记事本打开id_rsa.pub将全部的内容复制。
4. 打开https://github.com/,登岸账户,进入设置(Settings)找到
 5. 然后将你复制的内容粘贴到key中
再点击Add SSH Key  
6. 仍然在bash.exe中输入ssh -T git@github.com然后会跳出一堆内容你只需输入yes回车就完事了,然后他会提示你乐成了。

大功告成,再次输入 git clone 就乐成了

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!qidao123.com:ToB企服之家,中国第一个企服评测及软件市场,开放入驻,技术点评得现金

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?立即注册

×
回复

使用道具 举报

登录后关闭弹窗

登录参与点评抽奖  加入IT实名职场社区
去登录
快速回复 返回顶部 返回列表