解決Mac終端下載報錯 curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused

臨安_大大白發表於2020-10-19

一、錯誤來源

在下載node.js包管理工具時發現居然連線不上地址,錯誤如下:
在這裡插入圖片描述

二、分析與解決

1、測試連結

在這裡插入圖片描述
經過測試,發現連線不上,訪問被拒絕。

2、查詢網址資訊

網站IP地址查詢連線:https://githubusercontent.com.ipaddress.com/raw.githubusercontent.com
查詢結果如下:
在這裡插入圖片描述

3、配置hosts

使用的軟體是SwitchHosts,SwitchHosts 一個修改、管理、切換多個 hosts 方案的開源工具。
下載地址:https://oldj.github.io/SwitchHosts/#cn
在這裡插入圖片描述
在這裡插入圖片描述

4、結果

重新輸入命令,下載nvm工具成功。

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash

相關文章