解决hexo -d出现超时的问题

解决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都会不同,注意与自己的一致。

问题解决√

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值