1. 程式人生 > 其它 >小飛機可以解決git clone沒有返回的問題嗎?

小飛機可以解決git clone沒有返回的問題嗎?

【1】Linux如何使用小飛機?
以ss為例,先下載客戶端:
https://www.mediafire.com/folder/xag0zy318a5tt/Linux
下載客戶端以後,右鍵把許可權中“作為程式執行”勾選,開啟介面

然後在github上找到免費的賬號節點:
https://github.com/Alvin9999/new-pac/wiki/ss免費賬號
ss要用加密方式aes-256-gcm的,ssr有協議和混淆

對於瀏覽器,要在switchy omega中配置
protocol選擇SOCKS5 Server127.0.0.1 Port1080

【2】如何解決git clone沒有返回的問題
配置git proxy
git config --global http.proxy 127.0.0.1:1080

為全域性的git專案都設定代理
git config --local http.proxy 127.0.0.1"1080 為某個git專案設定單獨代理

刪除已有proxy
git config --global http.proxy 查詢已有proxy
git config --global --unset http.proxy 取消設定

【3】手動修改host檔案
開啟/etc/hosts檔案
手動往裡面加github的ip地址
https://websites.ipaddress.com/www.github.com 這個是看github最新IP地址的網站

sudo vim /etc/hosts
source /etc/hosts


修改後編譯:
source /etc/hosts

為了提高DNS 解析的記錄,很多作業系統都會提供快取DNS 記錄的功能,但是,這可能會為測試DNS 服務或域名設定帶來麻煩。為了測試出準確的結果,我們需要強制重新整理本地 DNS 快取記錄。

1、Install first the nscd daemon with this command from the terminal:
sudo apt-get install nscd
Then clear your DNS data with this command:
sudo /etc/init.d/nscd restart
2、You can also try to flush DNS cache with this command:
sudo /etc/init.d/networking restart
3、Try also this command:
sudo /etc/init.d/dns-clean start