使用 curl/git 命令时出现 Failed to connect to XXX port 443: 拒绝连接

这篇具有很好参考价值的文章主要介绍了使用 curl/git 命令时出现 Failed to connect to XXX port 443: 拒绝连接。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

原因与过程

  • 今天在linux下安装docker compose出现Failed connect to github.com:443; 拒绝连接
    linux curl 拒绝连接,异常,linux,docker,git

  • 网上查了下说是DNS被污染,改下host文件

解决办法

  • 首先你可以通过https://www.ipaddress.com/首页,输入 raw.githubusercontent.com 进行查询
    linux curl 拒绝连接,异常,linux,docker,git
  • 修改hosts
vim /etc/hosts

在最底下添加199.232.68.133 raw.githubusercontent.com保存起来即可
这个也同样可以解决 git 上的一些问题,也建议同时查找一下 github.com 的真实 ip 添加进去文章来源地址https://www.toymoban.com/news/detail-517454.html

140.82.113.3      github.com
140.82.114.20     gist.github.com
151.101.184.133    assets-cdn.github.com
151.101.184.133    raw.githubusercontent.com
151.101.184.133    gist.githubusercontent.com
151.101.184.133    cloud.githubusercontent.com
151.101.184.133    camo.githubusercontent.com
151.101.184.133    avatars0.githubusercontent.com
199.232.68.133     avatars0.githubusercontent.com
199.232.28.133     avatars1.githubusercontent.com
151.101.184.133    avatars1.githubusercontent.com
151.101.184.133    avatars2.githubusercontent.com
199.232.28.133     avatars2.githubusercontent.com
151.101.184.133    avatars3.githubusercontent.com
199.232.68.133     avatars3.githubusercontent.com
151.101.184.133    avatars4.githubusercontent.com
199.232.68.133     avatars4.githubusercontent.com
151.101.184.133    avatars5.githubusercontent.com
199.232.68.133     avatars5.githubusercontent.com
151.101.184.133    avatars6.githubusercontent.com
199.232.68.133     avatars6.githubusercontent.com
151.101.184.133    avatars7.githubusercontent.com
199.232.68.133     avatars7.githubusercontent.com
151.101.184.133    avatars8.githubusercontent.com
199.232.68.133     avatars8.githubusercontent.com

到了这里,关于使用 curl/git 命令时出现 Failed to connect to XXX port 443: 拒绝连接的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused的正常解决方法

    这个报错。。就是国内网络问题导致的raw.githubusercontent.com无法正常访问,可能科学上网也没什么作用,看网上的解决方法都是什么改host文件,改dns之类的。。属实蚌了 这个命令大多就是从raw.githubusercontent.com的路径下执行一个可执行文件,用来拷贝github上的文件到本地目录

    2024年02月12日
    浏览(30)
  • PostgreSQL Unable to connect to server: XXX port 5432 failed: Connection refused

    一、问题说明 使用 pgAdmin 连接本地的 PostgreSQL 时,报错“Unable to connect to server: XXX port 5432 failed: Connection refused”。 截图如下: 二、问题原因 通过报错提示信息可以看出:客户端工具访问被拒绝的原因是,由于本地的 PostgreSQL 服务没有启动。 三、解决方案 启动本地的 Postg

    2024年02月07日
    浏览(38)
  • 反复 Failed to connect to github.com port 443 after xxx ms

    前提:使用了代理,浏览器能稳定访问github,但git clone一直超时 解决方案: 1. git config --global http.proxy http://127.0.0.1:1080 2. 代理设置端口1080 3. 1080可自定义 感谢来自这篇博客和评论区的提醒:解决 Failed to connect to github.com port 443:connection timed out_fK0pS的博客-CSDN博客

    2024年02月15日
    浏览(31)
  • ubuntu22.04安装ROS报错curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接

    ubuntu22.04安装ros时在执行下面命令时报错: 报错: curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接 同时执行后面命令 sudo apt update 的时候,同时报错: 解决办法: 1、在网站https://www.ipaddress.com中搜索raw.githubusercontent.com的IP地址,把找到的IP地址复制到host文件;

    2024年02月04日
    浏览(41)
  • github clone Failed to connect to github.com port 443 after xxx ms

    最近克隆github项目时老是报超时,可以尝试以下解决方法 如果本地开启了代理还是clone超时,可以尝试最后一种方式解决 1、把 https 换成 http,如: 2、更新本地hosts配置,可以参考这篇文章获取最新的hosts 解决github图片及网页加载不出来 3、 将通信协议由 http/2 改为 http/1.1 改

    2024年01月19日
    浏览(42)
  • 使用git推送到远程仓库的时候报错Failed to connect to 127.0.0.1 port 7890: 拒绝连接

    问题 :使用git推送到远程仓库的时候报错Failed to connect to 127.0.0.1 port 7890: 拒绝连接 说明 :如果没有使用其他端口连接网络那么就看看是否在git中配置了proxy 解决方案 :看看之前有无代理 然后关掉这个代理 查看是否删除 git config --global -l 

    2024年01月18日
    浏览(36)
  • 解决使用git时遇到Failed to connect to github.com port 443 after 21090 ms: Couldn‘t connect to server

    先试试你能直接访问GitHub: Let’s build from here · GitHub吗? 你是直接就可以访问成功还是挂梯子之后访问成功的呢? fatal: unable to access \\\'https://github.com/xxx/******.git/\\\': Failed to connect to github.com port 443 after 21090 ms: Couldn\\\'t connect to server 一般出现这种问题都是开过VPN导致的本机系统端口

    2024年02月05日
    浏览(44)
  • git clone 报错Failed to connect to localhost port 7891: Connection refused

    system: ubuntu18.04 pc: lenovo thinkpad p15v gen1 电脑有安装VPN软件,git clone 报错 Failed to connect to localhost port 7891: Connection refused,尝试了多种方法,都没有效果,最后是这篇文章解决git下载出现:Failed to connect to 127.0.0.1 port 1080: Connection refused拒绝连接错误_failed connect to 拒绝连接_点亮~

    2024年02月10日
    浏览(32)
  • 解决unable to access ‘https://github.com/XXX‘: Failed to connect to github.com port 443 after 21093 ms

    问题: GitHub拉代码时报错 Clone failed unable to access \\\'https://github.com/majiang666/vue-pdf.git/\\\': Failed to connect to github.com port 443 after 21093 ms: Timed out 解决方法有两种,如下 方法一: 登录GitHub账号后再拉取代码 方法二: 在GitHub前面加上 username:passwords@ ,例:https:// username:passwords @github.c

    2024年02月05日
    浏览(41)
  • git提交Failed to connect to github.com port 443解决方法

    最近在提交代码到GitHub,一直提示提交失败 Push: unable to access \\\'https://github.com/username/project.git/\\\': Failed to connect to github.com port 443 after 21140 ms: Couldn\\\'t connect to server ,我以为是网络太差了,直接使用代理软件,还是同样的提示, 所以咨询了一位优秀的前端开发kaimo,才知道需要g

    2024年01月25日
    浏览(52)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包