关于github遇到问题 Please make sure you have the correct access rights and the repository exists

具体问题如下

username@server:~I$ git push
Received disconnect from 20.205.243.166: 11: Bye Bye
fatal: Could not read from remote repository.

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

原因分析

username@server:~$ ssh-add -l -E sha256
The agent has no identities.

发现代理未被识别
可以参考github官网的说明github关于此问题的连接

解决方法

第一步:
删除github上你此服务器的ssh-key
第二步:

username@server:~$rm ~/.ssh/
username@server:~$ssh-keygen -t ecdsa -C '你的github登记的邮箱'
username@server:~$chmod 600 ~/.ssh/id_ecdsa.pub
username@server:~$cat ~/.ssh/id_ecdsa.pub

第三步:
用此公钥重新在github山生成一个ssh-key
第四步:

username@server:~I$ git push
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx.
Are you sure you want to continue connecting (yes/no)? yes

过程中出现Are you sure you want to continue connecting (yes/no)? 肯定输入yes,然后就OK了

当你在使用Git命令或者在使用GitHub Desktop等工具时,出现"Please make sure you have the correct access rights and the repository exists."这个问题通常是由以下几个原因引起的: 1. 访问权限不正确:你可能没有足够的权限来访问该仓库。请确保你有正确的访问权限,包括读取和写入权限。如果你是该仓库的拥有者或管理员,可以检查并设置正确的权限。 2. 仓库不存在:你可能输入了错误的仓库名称或者仓库不存在。请确保你输入的仓库名称是正确的,并且该仓库确实存在于GitHub上。 3. 认证问题:如果你正在使用私有仓库,可能需要提供正确的认证信息,例如用户名和密码、访问令牌等。请确保你提供了正确的认证信息。 解决这个问题的方法包括: 1. 检查访问权限:确保你有足够的权限来访问该仓库。如果你不确定自己的权限,可以联系仓库的拥有者或管理员进行确认。 2. 检查仓库名称:确认你输入的仓库名称是正确的,并且该仓库确实存在于GitHub上。可以在GitHub网站上搜索该仓库来确认。 3. 检查认证信息:如果你正在使用私有仓库或需要认证访问,确保你提供了正确的认证信息。可以尝试重新输入用户名和密码、访问令牌等。 如果以上方法都没有解决问题,可能需要进一步检查网络连接、Git配置等方面的问题。你可以提供更多的详细信息,以便我能够给出更具体的解决方案。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值