github ssh连接失败

ssh -T git@github.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in C:\\Users\\zhang/.ssh/known_hosts to get rid of this message.
Offending RSA key in C:\\Users\\zhang/.ssh/known_hosts:1
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.

通过ssh连接github失败,将known_hosts中github相关的条目删掉!!!!

再次尝试

ssh -T git@github.com
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ED25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com' (ED25519) to the list of known hosts.
Hi novaCoder-zrk! You've successfully authenticated, but GitHub does not provide shell access.

当通过ssh连接的github仓库尝试pull的时候,报错。

git pull kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22 fatal: Could not read from
remote repository.

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

先把 .ssh 文件夹下的known_hosts known_hosts .old 中有关github的都删除。然后执行下面的语句:

ssh -T git@github.com

The authenticity of host ‘github.com
(20.205.243.166)’ can’t be established. ED25519 key fingerprint is
********8. This key is not
known by any other names Are you sure you want to continue connecting
(yes/no/[fingerprint])? yes Warning: Permanently added ‘github.com’
(ED25519) to the list of known hosts. Hi *******! You’ve
successfully authenticated, but GitHub does not provide shell access.

当删除远程镜像,添加新的远程

 git branch --set-upstream-to=origin/master

把本地和远程镜像连接上。

然后 git pull

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Linux中使用wget命令连接GitHub失败可能有多种原因。其中一种可能是网络连接问题,如引用\[1\]所示,可能是由于连接超时导致无法访问GitHub。另一种可能是由于SSH连接断开导致的问题,如引用\[2\]所述,如果长时间不操作,SSH连接可能会断开。此外,还有一种可能是由于MySQL配置文件中不允许远程连接导致的问题,如引用\[3\]所提到的,Linux的MySQL默认情况下不允许远程连接操作。 要解决这个问题,首先需要确保网络连接正常。可以尝试使用ping命令检查是否能够成功连接GitHub。如果网络连接正常,但仍然无法连接GitHub,可以尝试使用其他方法,如使用代理服务器或更改网络设置来解决连接问题。 如果是SSH连接断开导致的问题,可以尝试在连接GitHub之前设置SSH会话保持活动状态,以避免连接断开。可以通过修改SSH配置文件来实现这一点。 如果是MySQL不允许远程连接导致的问题,可以通过修改MySQL配置文件来允许远程连接。具体的方法可以参考引用\[3\]中提到的在stack上找到的方法。 总之,解决Linux中使用wget命令连接GitHub失败的问题需要根据具体情况进行排查,并根据引用内容中提到的方法进行相应的调整和配置。 #### 引用[.reference_title] - *1* [github 443问题](https://blog.csdn.net/weixin_43214668/article/details/122667471)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [Linux sh远程连接失败 sshd.service启动失败](https://blog.csdn.net/weixin_35619710/article/details/116821824)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值