首页 > 其他分享 >彻底解决【“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”】错误

彻底解决【“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”】错误

时间:2024-10-18 16:10:50浏览次数:1  
标签:githubusercontent raw 443 Failed 68.133 https curl com

 

用如下命令下载安装msf时,提示curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

curl https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb > msfinstall && \
chmod 755 msfinstall && \
./msfinstall

之前也遇到过类似的错误,用的解决方法是,fq工具打开全局模式,然后打开curl后面的地址(这里是:https://raw.githubusercontent.com/rapid7/metasploit-omnibus/master/config/templates/metasploit-framework-wrappers/msfupdate.erb),之后另存为文件,并依次执行后续命令。

上面是最简单便捷的方法,详细内容可以参考:Homebrew installation on Mac OS X Failed to connect to raw.githubusercontent.com port 443

update – 最终解决方案
最近再次遇到该问题,详细了解了下,发现是 github 的一些域名的 DNS 解析被污染,导致DNS 解析过程无法通过域名取得正确的IP地址。可以通过修改/etc/hosts文件可解决该问题。

具体而言:

打开 https://www.ipaddress.com/ 输入访问不了的域名,获得对应的IP。

使用vim /etc/hosts命令打开不能访问的机器的hosts文件,添加如下内容:

199.232.68.133 raw.githubusercontent.com
199.232.68.133 user-images.githubusercontent.com
199.232.68.133 avatars2.githubusercontent.com
199.232.68.133 avatars1.githubusercontent.com

注:上面内容中199.232.68.133是raw.githubusercontent.com所在的服务器IP(通过 https://www.ipaddress.com/ 获知)。

保存该文件,再使用即可正常访问。


原文链接:https://blog.csdn.net/donaldsy/article/details/107482368

标签:githubusercontent,raw,443,Failed,68.133,https,curl,com
From: https://www.cnblogs.com/fyiyy/p/18474512

相关文章

  • com.microsoft.sqlserver.jdbc.SQLServerException: Software caused connection abor
    报错原因今天新安装的SQLSERVER2012,于是ruoyi框架就测试多数据源,结果发现无法连接。奇怪的是navicat可以连接,SQLServerManagementStudio也可以正常连接。我们都知道SQLSERVER默认的端口是1433,结果我用1433连接不上。于是查询了端口,发现只有1434端口开着,这个端口一看就是......
  • python系列&deep_study系列:【已解决】Failed to initialize NVML: Driver/library ver
    【已解决】FailedtoinitializeNVML:Driver/libraryversionmismatchNVMLlibraryversion:535.161【已解决】FailedtoinitializeNVML:Driver/libraryversionmismatchNVMLlibraryversion:535.161问题描述原因分析和解决当我把这个问题喂给`chatgpt`的时......
  • Connection to tcp://192.168.112.137:1935?tcp_nodelay=0 failed: Connection timed
    记录一下自己的报错和解决步骤输入catnginx.conf 查看Nginx的配置文件nginx.conf修改nginx核心配置文件nginx,添加rtmp模块rtmp{                                          ......
  • node打包报错:ERROR in xxxx.js Module not found: Error: Can’t resolve xxxx in ‘
    原文链接:node打包报错:ERRORinxxxx.jsModulenotfound:Error:Can’tresolvexxxxin‘xxx’errorCommandfailedwithexitcode1.–每天进步一点点(longkui.site) 0.背景anguar项目。分为主包和子包,子包推送到npm私有仓库中,然后主包在packjson中引入子包的版本......
  • Failed to clean project: Failed to delete
    原文链接:Failedtocleanproject:Failedtodelete–每天进步一点点(longkui.site)使用IDEA编辑代码,电脑突然死机。然后重启电脑后,执行mavenclean指令。结果报错:Failedtoexecutegoalorg.apache.maven.plugins:maven-clean-plugin:2.5:clean(default-clean)onproj......
  • 虚拟机之间能够ping通,但是建立tcp连接时却显示Failed in connect to TCP server: No r
    实验环境:A、B、C三台虚拟机,A、B一个子网、B、C一个子网,AC之间通信通过B进行转发。现象:A、C相互能够ping通,但是尝试建立TCP连接时却一直显示Noroutetohost。能够ping通,按理讲路由表应该没问题,但是还是先对几个虚拟机之间的路由表进行检查。通过以下指令查看路由表:iproute......
  • 宝塔面板443端口不强制跳转
    宝塔面板默认支持通过配置网站的SSL来实现HTTP到HTTPS的强制跳转。如果你遇到443端口不强制跳转的问题,可以按照以下步骤进行检查和解决:确认SSL证书状态确保你的网站已经正确安装了SSL证书,并且证书状态有效。检查证书是否过期或即将过期。检查网站配置在宝塔面板中进入......
  • 用第二客户端远程连接hive报错Failed to connect to node1:10000
    报错内容:24/10/1315:08:35[main]:WARNjdbc.HiveConnection:Failedtoconnecttonode1:10000Error:CouldnotopenclienttransportwithJDBCUri:jdbc:hive2://node1:10000:Failedtoopennewsession:java.lang.RuntimeException:org.apache.hadoop.ipc.Remo......
  • 宝塔面板占用443端口怎么办
    宝塔面板默认会占用443端口来提供HTTPS服务,如果你在服务器上部署了其他服务也需要使用443端口,可能会遇到端口冲突的问题。以下是一些解决方法:更改宝塔面板的端口登录到宝塔面板。前往“服务器”->“nginx”或“Apache”设置。修改HTTP和HTTPS端口号。保存并重启服务。......
  • 聊聊git push到远程服务器出现RPC failed问题
    前言最近小组成员跟我说,他git提交不了代码。我问了下原因,他说他代码一提交就会报代码语言:txt复制error:RPCfailed;HTTP413curl22TherequestedURLreturnederror:413fatal:theremoteendhungupunexpectedlyfatal:theremoteendhungupunexpected......