一、現象
連接着vpn,網頁上可以直接打開網站,但是使用terminal 執行git clone https://chromium.googlesource.com/xxxx時,
報錯:Failed to connect to chromium.googlesource.com port 443: Operation timed out
二、原因
這是因為terminal沒有走代理的流量,
三、方法
使用git config --global http.proxy "localhost:port",設置代理。
port是端口號,根據不同的vpn不一樣,我這里使用的是lartern,端口是50321。
四、操作
執行 git config --global http.proxy "localhost:50321"
成功!
作者:wangyubin2010n
來源:CSDN
原文:https://blog.csdn.net/wangyubin2010n/article/details/83302635
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!