github被牆無法提交程式碼解決方案
阿新 • • 發佈:2019-02-19
從前兩天開始往github上提交程式碼一直提示錯誤資訊“fatal: unable to access 'https://github.com/zizaimengzhongyue/blog.git/': Failed to connect to github.com port 443: Connection refused“,應該是被牆了,需要使用代理。
git配置代理的方式:
git config --global http.proxy "localhost:8787"
我使用的代理是lantern,預設埠是8787,只要根據自己使用的vpn配置不同的埠即可。
配置之後:
luyanfengdeMacBook-Pro:blog luyanfeng$ git push Counting objects: 12, done. Delta compression using up to 4 threads. Compressing objects: 100% (11/11), done. Writing objects: 100% (12/12), 2.10 KiB | 0 bytes/s, done. Total 12 (delta 6), reused 0 (delta 0) To https://github.com/zizaimengzhongyue/blog.git 3a6f621..2835b25 master -> master