github无法连接报错port 22和could not read Password for 'https://***@github.com'


🙂前言

GitHub是世界上最大的代码托管平台,超7千万开发者正在使用,小波博客现阶段也是依托于github+vercel+leancloud来实现纯前端全栈,所以玩博客时不时操作github有些莫名其妙的报错,无法连接,小波整理收集自己遇见的github问题于此文章,顺便分享给其他小伙伴们…


🧐github因为代理报错

  • 报错代码

1
2
3
4
5
github.com,20.205.243.166 ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg=

kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: Could not read from remote repository.
  • 报错原因

因为开了相关代理插件,软件等

  • 解决方案

把相关代理关闭。

例如小波自己edge浏览器安装了相关插件,关了浏览器,然后任务管理器中看看是否还有残留服务也要一并关了,不然依旧无法连接github.


🤔github因为token过期报错

  • 报错代码

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
ssh: connect to host github.com port 22: Connection refused
fatal: Could not read from remote repository.

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


fatal: could not read Password for 'https://***@github.com': No such device or address

[1140](https://github.com/gumpBOBO/nianzhu/actions/runs/3622410335/jobs/6107085625#step:7:1141)FATAL Something's wrong. Maybe you can find the solution here: https://hexo.io/docs/troubleshooting.html

[1141](https://github.com/gumpBOBO/nianzhu/actions/runs/3622410335/jobs/6107085625#step:7:1142)Error: Spawn failed

[1142](https://github.com/gumpBOBO/nianzhu/actions/runs/3622410335/jobs/6107085625#step:7:1143) at ChildProcess.<anonymous> (/home/runner/work/nianzhu/nianzhu/node_modules/hexo-util/lib/spawn.js:51:21)

[1143](https://github.com/gumpBOBO/nianzhu/actions/runs/3622410335/jobs/6107085625#step:7:1144) at ChildProcess.emit (events.js:400:28)

[1144](https://github.com/gumpBOBO/nianzhu/actions/runs/3622410335/jobs/6107085625#step:7:1145) at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)

[1145](https://github.com/gumpBOBO/nianzhu/actions/runs/3622410335/jobs/6107085625#step:7:1146)Error: Process completed with exit code 2.

  • 报错原因

github前面报了几次安全问题后,不像以前直接用帐号连接,2022年开始只能用token连接,但是token有时忘记过期了会导致上面的报错。

  • 解决方案

一下出现丈二和尚摸不着头脑,不要慌直接去github网站把token重新生成一个即可。

可参考小波的这篇文章生成新token - hexo+github+leancloud纯前端全栈搭建免费个人博客2022(一)

注意:token只能重新生成无法同一个再更新时间延续,无效的


关注廿壴(GANXB2)微信公众号

『旅行者』,帮小波关注一波公众号吧。

小波需要100位关注者才能申请红包封面设计资格,万分感谢!

关注后可微信小波,前66的童鞋可以申请专属红包封面设计。

THE END
作者
chopin gump chopin gump
小尾巴
Stay Hungry, Stay Foolish「求知若饥, 虚心若愚」 — 廿壴(GANXB2)
许可协议
github无法连接报错port 22和could not read Password for 'https://***@github.com'
https://blog.ganxb2.com/49492.html
微信

微信

支付宝

支付宝

- ( ゜- ゜)つロ 填写QQ邮箱自动获取头像亦更快获得回复通知
评论区显示“刷新”,多点几下或过会儿再来康康 _(≧∇≦」∠)_