问题描述:

输入truffle init

输出 Error: Error making request to https://raw.githubusercontent.com/truffle-box/bare-box/master/truffle.js. Got error: connect ECONNREFUSED 151.101.192.133:443. Please check the format of the requested resource

解决方法:修改hosts

1、win+R

2、c:\windows\system32\drivers\etc

3、将hosts文件复制到桌面打开,添加 151.101.192.133:443 github.com

4、用修改后的hosts文件覆盖原hosts文件

下一步问题描述:

输入 truffle init
输出 Downloading...
Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist. If you believe this is an error, please contact Truffle support.

解决办法:修改hosts

在hosts文件中添加:github.com和github.global.ssl.fastly.net及对应ip

注意:github.com和github.global.ssl.fastly.net对应ip可能因机器不同而不相同,可以使用该站点查询对应域名的ip(https://www.ipaddress.com/ip-lookup
posted on 2019-11-21 11:25  王晓阳的小可爱  阅读(2090)  评论(1编辑  收藏  举报