How to fix use the cURL to connect to GitHub with a 443 HTTPS error All In One
# nvm
$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
https://github.com/nvm-sh/nvm#installing-and-updating
errors
curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接
pi@raspberrypi:~ $ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接
solution
ping
& get the IP address
$ pi@raspberrypi:~ $ ping github.com
PING github.com (20.205.243.166) 56(84) bytes of data.
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=1 ttl=113 time=175 ms
64 bytes from 20.205.243.166 (20.205.243.166): icmp_seq=2 ttl=113 time=92.9 ms
^C
--- github.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 92.860/133.709/174.558/40.849 ms
- 配置
hosts
文件
$ cat /etc/hosts
$ sudo vim /etc/hosts
# add the belows one line code
# 20.205.243.166 github.com