使用VPN代理之后,無法使用Git拉取代碼
使用了VPN代理后,拉取代碼報(bào)錯(cuò)
$ git clone https://github.com/PanJiaChen/vue-element-admin
Cloning into 'vue-element-admin'...
fatal: unable to access 'https://github.com/PanJiaChen/vue-element-admin/': OpenSSL SSL_read: Connection was reset, errno 10054
解決辦法
原因:git需要設(shè)置代理
第一種辦法:git需要設(shè)置代理,如vpn端口號為8888,則Git設(shè)置代理為:8888
git config --global http.proxy '127.0.0.1:8888'
git config --global https.proxy '127.0.0.1:8888'
第二種辦法:直接取消代理
查看代理:
git config --global --get http.proxy
git config --global --get https.proxy
取消代理:文章來源:http://www.zghlxwxcb.cn/news/detail-636262.html
git config --global --unset http.proxy
git config --global --unset https.proxy
然后在拉取代碼,發(fā)現(xiàn)就可以了文章來源地址http://www.zghlxwxcb.cn/news/detail-636262.html
$ git clone https://github.com/PanJiaChen/vue-element-admin
Cloning into 'vue-element-admin'...
remote: Enumerating objects: 11979, done.
remote: Total 11979 (delta 0), reused 0 (delta 0), pack-reused 11979
Receiving objects: 100% (11979/11979), 15.07 MiB | 90.00 KiB/s, done.
Resolving deltas: 100% (7365/7365), done.
到了這里,關(guān)于使用VPN代理之后,無法使用Git拉取代碼的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!