xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

How to fix use the cURL to connect to GitHub with a 443 HTTPS error All In One

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: 拒绝连接

image

solutions

  1. ping & get the IP address
# macOS ✅
$ ping https://raw.githubusercontent.com
PING https://raw.githubusercontent.com (185.199.108.133): 56 data bytes
64 bytes from 185.199.108.133: icmp_seq=0 ttl=53 time=43.428 ms
64 bytes from 185.199.108.133: icmp_seq=1 ttl=53 time=48.094 ms
64 bytes from 185.199.108.133: icmp_seq=2 ttl=53 time=36.868 ms
64 bytes from 185.199.108.133: icmp_seq=3 ttl=53 time=57.699 ms
64 bytes from 185.199.108.133: icmp_seq=4 ttl=53 time=58.186 ms
64 bytes from 185.199.108.133: icmp_seq=5 ttl=53 time=44.105 ms
^C
--- https://raw.githubusercontent.com ping statistics ---
6 packets transmitted, 6 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 36.868/48.063/58.186/7.722 ms

image

# Raspberry Pi ❌
$ ping https://raw.githubusercontent.com
ping: https://raw.githubusercontent.com: 未知的名称或服务
$ 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


image

  1. 配置 hosts 文件
$ cat /etc/hosts

$ sudo vim /etc/hosts

# add the below lines of code
# 20.205.243.166 github.com
# 185.199.108.133 raw.githubusercontent.com
$ cat /etc/hosts
127.0.0.1	localhost
::1		localhost ip6-localhost ip6-loopback
ff02::1		ip6-allnodes
ff02::2		ip6-allrouters

127.0.1.1	raspberrypi

# github
20.205.243.166 github.com
# githubusercontent
185.199.108.133 raw.githubusercontent.com

image

# Close and reopen your terminal to start using nvm

# OR, run the following to use it now:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion

image

$ nvm --version

$ nvm ls

$ nvm ls-remote

$ nvm ls-remote | grep "LTS"

wifi scan

iwlist

# scanning for wireless networks
$ sudo iwlist wlan0 scan

$ sudo iwlist wlan0 scan > wifi-scan.md

$ cat ./wifi-scan.md | grep ESSID

https://www.cnblogs.com/xgqfrms/p/17329203.html

(🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明这是一篇剽窃的文章,请访问 https://www.cnblogs.com/xgqfrms/ 查看原创文章!

refs



©xgqfrms 2012-2021

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @ 2023-04-18 11:51  xgqfrms  阅读(47)  评论(0编辑  收藏  举报