美文网首页
GitHub、gitee无法访问、443 Operation t

GitHub、gitee无法访问、443 Operation t

作者: 前端青音 | 来源:发表于2021-10-10 10:50 被阅读0次

    gitee

    情况:gitee突然拉不了代码,报如下错误:
    Failed to connect to gitee.com port 443: Operation timed out

    情况一(仓库域名无法访问)

    1、查询可以用的IP
    https://www.ipaddress.com/上分别搜索
    "gitee.com",就会进入 https://websites.ipaddress.com/gitee.com,复制查询出来的

    IP Address  154.xxx.2.xxx (每个人的不同,记录你自己的IP Address )
    

    2、修改host文件

    操作:sudo vi /etc/hosts,输入密码,进入hosts文件,替换成以下ip即可

    154.xxx.2.xxx (刚刚查出来的IP)  gitee.com
    

    github

    情况:github突然拉不了代码,报如下错误:
    Failed to connect to github.com port 443: Operation timed out

    1、查询可以用的IP
    https://www.ipaddress.com/上分别搜索
    github.com、github.global-ssl.fastly.net ,记录对应的IP Address

    IP Address  154.xxx.2.xxx (每个人的不同,记录你自己的IP Address )
    

    2、修改host文件

    操作:sudo vi /etc/hosts,输入密码,进入hosts文件,替换成以下ip即可

    151.xxx.185.xxx(刚刚查出来的IP)  github.global-ssl.fastly.net
    154.xxx.2.xxx (刚刚查出来的IP)  github.com
    
    情况二(需要梯子的资源)

    遇到资源库一定需要梯子的情况,如需要访问https://chromium.googlesource.com/,梯子后仍然无法下载。原因是没有执行到外部的的流量。

    1.设置代理方法即可解决(请自行查找你的http代理端口)
    git config --global http.proxy "localhost:port"

    2.完成后取消设置
    git config --global --unset http.proxy

    参考文档:
    GitHub无法访问、443 Operation timed out的解决办法

    问题:Failed to connect to github.com port 443: Operation timed out

    相关文章

      网友评论

          本文标题:GitHub、gitee无法访问、443 Operation t

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