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只能重新生成无法同一个再更新时间延续,无效的


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

微信

支付宝

支付宝

🕐如果评论显示“刷新”无法加载,过一会再来康康~🕢 _(≧∇≦」∠)_ (填写常用邮箱即可快速收到回复通知~)