git Time out error解决

错误信息:

1
2
3
4
5
6
7
8
9
10
11
fatal: unable to access 'https://github.com/gladdduck/gladdduck.github.io.git/':
Failed to connect to github.com port 443 after 21048 ms: Timed out
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (D:\BaiduSyncdisk\Blog\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.cp.emit (D:\BaiduSyncdisk\Blog\node_modules\cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (node:internal/child_process:293:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

解决:

git中输入

1
2
3
git config --global --unset http.proxy

git config --global --unset https.proxy

cmd 中输入

1
ipconfig /flushdns

刷新 dns缓存

然后再执行相应命令.

成功