錯誤情況
- pac文件中已經添加域名,瀏覽器可以訪問github.com,但終端ping不通。
- 使用
yarn install
安裝依賴,一直遇到fatal: unable to access 'https://github.com/protobuf.js/': LibreSSL SSL_read: Operation timed out, errno 60
的錯誤。 - 使用
git clone https://github.com/protobuf.js.git
可以拉取倉庫。
解決辦法
- 搜索github.com 的IP地址, 網址 Hostname to IP Address.
- 發現IP是 140.82.112.4, 且可以ping通。
- 將這個IP加入host文件,
sudo vi /etc/hosts
- 再次
ping github.com
, 成功
解決辦法2
- 直接從你的代理軟件中選擇
Copy HTTP Proxy Shell Export Line
- 在終端中黏貼:
export http_proxy="http://127.0.0.1:8001"; export HTTP_PROXY="http://127.0.0.1:8001"; export https_proxy="http://127.0.0.1:8001"; export HTTPS_PROXY="http://127.0.0.1:8001"