解决hexo -d出现超时的问题
Author : RKayer
问题
fatal: unable to access 'https://github.com/RKayer/RKayer.github.io/': Failed to connect to github.com port 443: Timed out
FATAL {
err: Error: Spawn failed
at ChildProcess.<anonymous> (D:\blog\node_modules\hexo-util\lib\spawn.js:51:21)
at ChildProcess.emit (events.js:315:20)
at ChildProcess.cp.emit (D:\blog\node_modules\cross-spawn\lib\enoent.js:34:29)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) {
code: 128
}
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
网络端口进入超时。原因是申请了代理VPN出现的问题。
解决方法:
1.打开WIN10的网络和internet,找到代理一项。可以看到代理一项已被打开,下面有个脚本地址。
2.复制脚本地址并在浏览器中打开,自动下载pac文件。
3.打开pac文件可以看到
function FindProxyForURL(url, host) {
if (isPlainHostName(host) // including localhost
|| shExpMatch(host, "*.local")) {
return "DIRECT";
}
// only checks plain IP addresses to avoid leaking domain name
if (/^[0-9.]+$/.test(host)) {
if (isInNet(host, "10.0.0.0", "255.0.0.0") ||
isInNet(host, "172.16.0.0", "255.240.0.0") ||
isInNet(host, "192.168.0.0", "255.255.0.0") ||
isInNet(host, "127.0.0.0", "255.255.255.0")) {
return "DIRECT";
}
}
return "PROXY 127.0.0.1:19180";
}
看到最后一行的proxy,在git中输入
git config --global http.proxy 127.0.0.1:19180
为全局的 git 项目都设置代理
不同的代理后面的IP都会不同,注意与自己的一致。
问题解决√