water0320
water0320
2021-06-18 18:55
采纳率: 100%
浏览 115

Error connecting to github.com

C:\Users\myapp>truffle unbox
This directory is non-empty...
? Proceed anyway? (Y/n)
Starting unbox...
=================

? Proceed anyway? Yes
√ Preparing to download box
× Downloading
Unbox failed!
× Downloading
Unbox failed!
Error: Error connecting to github.com. Please check your internet connection and try again.
    at C:\Program Files\nodejs\node_global\node_modules\truffle\build\webpack:\packages\box\dist\lib\utils\unbox.js:45:1
    at Generator.throw (<anonymous>)
    at rejected (C:\Program Files\nodejs\node_global\node_modules\truffle\build\webpack:\packages\box\dist\lib\utils\unbox.js:6:41)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
Truffle v5.3.10 (core: 5.3.10)
Node v14.17.1

其中报错Error connecting to github.com

  • 点赞
  • 收藏

5条回答 默认 最新

  • qq_15228737
    奋斗的小小鱼 2021-06-18 19:07

    应该是访问不到境外的域名服务器,试下复制下面配置到hosts文件(C:\Windows\System32\drivers\etc\hosts)

    # GitHub Start

    192.30.255.112 gist.github.com

    192.30.255.112 github.com

    192.30.255.112 www.github.com

    151.101.56.133 avatars0.githubusercontent.com

    151.101.56.133 avatars1.githubusercontent.com

    151.101.56.133 avatars2.githubusercontent.com

    151.101.56.133 avatars3.githubusercontent.com

    151.101.56.133 avatars4.githubusercontent.com

    151.101.56.133 avatars5.githubusercontent.com

    151.101.56.133 avatars6.githubusercontent.com

    151.101.56.133 avatars7.githubusercontent.com

    151.101.56.133 avatars8.githubusercontent.com

    151.101.56.133 camo.githubusercontent.com

    151.101.56.133 cloud.githubusercontent.com

    151.101.56.133 gist.githubusercontent.com

    151.101.56.133 marketplace-screenshots.githubusercontent.com

    151.101.56.133 raw.githubusercontent.com

    151.101.56.133 repository-images.githubusercontent.com

    151.101.56.133 user-images.githubusercontent.com

    # GitHub End
     

    点赞 评论
  • QQ3200028121
    QQ3200028121 2021-06-18 19:35

    找个代理,爬个楼,翻下墙

    点赞 评论
  • bm1998
    bm1998 2021-06-18 22:38

    git config --global url."git://".insteadOf https://

    点赞 评论
  • boyas
    ༄༊星河༣ 2021-06-21 12:41

    有一个最好的办法就是将你的网络换成无线WIFI

    点赞 评论
  • Feng_wwf
    NDSC专家-王文峯 2021-06-23 16:34
    点赞 评论

相关推荐