您的位置:首页 > Web前端 > Vue.js

vue-cli · Failed to download repo vuejs-templates/webpack-simple: connect ECONNREFUSED 12.0.0.1:443

2019-01-06 18:03 1841 查看

出现了一个问题。
vue-cli · Failed to download repo vuejs-templates/webpack-simple: connect ECONNREFUSED

解决方法:
从网上查看了很多的方法,试过都不管用,github的网址和IP可以ping通但是,github网站是不能上的。
此时找到hosts文件,在下面的路径里。我的电脑一开始没有hosts文件,我给他修复了一个出来,具体方法去百度。

修复完成后,需要往hosts文件里添加,一堆github的地址。
从下面开始。
#127.0.0.1 gilisoft.com
#github
192.30.253.113 github.com
192.30.253.113 github.com
192.30.253.118 gist.github.com
192.30.253.119 gist.github.com

GitHub Start

192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com

GitHub End

完成后,需要保存,这里要保存成hosts文件,注意此文件无后缀。
然后重启电脑。
尝试vue init webpack-smiple xxxx 就可以正常初始化了,
这个问题花了我1天 的时间,从网站找了很多答案都不靠谱,希望可以帮到大家。

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: