美文网首页
git clone项目失败

git clone项目失败

作者: 尹_路人 | 来源:发表于2021-10-20 19:10 被阅读0次

    有段时间没用github了
    今天想把一个demo传上去,
    结果在github官网上创建了一个空仓库之后,
    想通过终端git clone git@github.com:****.git 的时候报错了

    • 有的时候是这个错

      ssh_dispatch_run_fatal: Connection to 20.205.243.166 port 22: Broken pipe
      
    • 有的时候是这个错

      Connection reset by 20.205.243.166 port 22
      

    我也不知道咋回事,搜索了一番,尝试ping命令

    ping github.com 超时。。。
    ping baidu.com 正常

    似乎知道是哪里的问题了

    找到hosts文件
    添加如下的配置

    140.82.112.3 github.com
    199.232.5.194 github.global.ssl.fastly.net
    

    再去ping github.com 不超时了

    再去clone项目 ok了

    相关文章

      网友评论

          本文标题:git clone项目失败

          本文链接:https://www.haomeiwen.com/subject/wvtxaltx.html