git proxy

最后也沒(méi)有解決掉- -||

一開(kāi)始就是怎樣做的勤庐,最后還是這樣做起到了作用:只是
export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7891

git config --global is stored in ~/.gitconfig 
local config settings is in ./.git/config. 
To remove a configuration, e.g. run git config --global --unset core.gitproxy.

Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning
or fetching from a remote repository or getting an error
like unable to access '...' Couldn't resolve host '...'.

Consider something like:

git config --global http.proxy http://proxyUsername:proxyPassword@proxy.server.com:port

Or for a specific domain, something like:

git config --global http.https://domain.com.proxy http://proxyUsername:proxyPassword@proxy.server.com:port
git config --global http.https://domain.com.sslVerify false

Setting http.<url>.sslVerify to false may help you quickly get going if your workplace
employs man-in-the-middle HTTPS proxying. Longer term, you could get the
root CA that they are applying to the certificate chain
and specify it with either http.sslCAInfo or http.sslCAPath.

See also the git-config documentation, especially the following
sections if you're having HTTPS/SSL issues

  • http.sslVerify
  • http.sslCAInfo
  • http.sslCAPath
  • http.sslCert
  • http.sslKey
  • http.sslCertPasswordProtected

In Detail

Configure the proxy

You can configure these globally in your user ~/.gitconfig file using the --global switch, or local to a repository in its .git/config file.

Setting a global proxy

Configure a global proxy if all access to all repos require this proxy

git config --global http.proxy http://proxyUsername:proxyPassword@proxy.server.com:port

URL specific proxy

If you wish to specify that a proxy should be used for just
some URLs that specify the URL as a git config subsection
using http.<url>.key notation:

git config --global http.https://domain.com.proxy http://proxyUsername:proxyPassword@proxy.server.com:port

Which will result in the following in the ~/.gitconfig file:

[http]
[http "https://domain.com"]
    proxy = http://proxyUsername:proxyPassword@proxy.server.com:port

Handle subsequent SSL protocol errors

If you're still having trouble cloning or fetching and are now getting
an unable to access 'https://...': Unknown SSL protocol error in connection to ...:443 then
you may decide to switch off SSL verification for the single operation
by using the -c http.sslVerify=false option

git -c http.sslVerify=false clone https://domain.com/path/to/git

Once cloned, you may decide set this for just this cloned
repository's .git/config by doing. Notice the absence of the --global

git config http.sslVerify false

If you choose to make it global then limit it to a URL using
the http.<url>.sslVerify notation:

git config --global http.https://domain.com.sslVerify false

Which will result in the following in the ~/.gitconfig file:

[http]
[http "https://domain.com"]
    proxy = http://proxyUsername:proxyPassword@proxy.server.com:port
    sslVerify = false

Show current configuration

To show the current configuration of all http sections

git config --global --get-regexp http.*

If you are in a locally cloned repository folder then you drop
the --global and see all current config:

git config --get-regexp http.*

Unset a proxy or SSL verification

Use the --unset flag to remove configuration being specific about the
property -- for example whether it was http.proxy or http.<url>.proxy.
Consider using any of the following:

git config --global --unset http.proxy
git config --global --unset http.https://domain.com.proxy

git config --global --unset http.sslVerify
git config --global --unset http.https://domain.com.sslVerify

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末崇猫,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子砸西,更是在濱河造成了極大的恐慌声搁,老刑警劉巖家卖,帶你破解...
    沈念sama閱讀 216,997評(píng)論 6 502
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異匣距,居然都是意外死亡面哥,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,603評(píng)論 3 392
  • 文/潘曉璐 我一進(jìn)店門毅待,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)尚卫,“玉大人,你說(shuō)我怎么就攤上這事尸红≈ㄉ妫” “怎么了勿璃?”我有些...
    開(kāi)封第一講書(shū)人閱讀 163,359評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵桦踊,是天一觀的道長(zhǎng)。 經(jīng)常有香客問(wèn)我,道長(zhǎng)撵孤,這世上最難降的妖魔是什么状植? 我笑而不...
    開(kāi)封第一講書(shū)人閱讀 58,309評(píng)論 1 292
  • 正文 為了忘掉前任葛超,我火速辦了婚禮官扣,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘芙委。我一直安慰自己逞敷,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,346評(píng)論 6 390
  • 文/花漫 我一把揭開(kāi)白布灌侣。 她就那樣靜靜地躺著兰粉,像睡著了一般。 火紅的嫁衣襯著肌膚如雪顶瞳。 梳的紋絲不亂的頭發(fā)上,一...
    開(kāi)封第一講書(shū)人閱讀 51,258評(píng)論 1 300
  • 那天愕秫,我揣著相機(jī)與錄音慨菱,去河邊找鬼。 笑死戴甩,一個(gè)胖子當(dāng)著我的面吹牛符喝,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播甜孤,決...
    沈念sama閱讀 40,122評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼协饲,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼!你這毒婦竟也來(lái)了缴川?” 一聲冷哼從身側(cè)響起茉稠,我...
    開(kāi)封第一講書(shū)人閱讀 38,970評(píng)論 0 275
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎把夸,沒(méi)想到半個(gè)月后而线,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,403評(píng)論 1 313
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡恋日,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,596評(píng)論 3 334
  • 正文 我和宋清朗相戀三年膀篮,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片岂膳。...
    茶點(diǎn)故事閱讀 39,769評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡誓竿,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出谈截,到底是詐尸還是另有隱情筷屡,我是刑警寧澤涧偷,帶...
    沈念sama閱讀 35,464評(píng)論 5 344
  • 正文 年R本政府宣布,位于F島的核電站速蕊,受9級(jí)特大地震影響嫂丙,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜规哲,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,075評(píng)論 3 327
  • 文/蒙蒙 一跟啤、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧唉锌,春花似錦隅肥、人聲如沸。這莊子的主人今日做“春日...
    開(kāi)封第一講書(shū)人閱讀 31,705評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)。三九已至绿语,卻和暖如春秃症,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背吕粹。 一陣腳步聲響...
    開(kāi)封第一講書(shū)人閱讀 32,848評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工种柑, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人匹耕。 一個(gè)月前我還...
    沈念sama閱讀 47,831評(píng)論 2 370
  • 正文 我出身青樓聚请,卻偏偏與公主長(zhǎng)得像,于是被迫代替她去往敵國(guó)和親稳其。 傳聞我的和親對(duì)象是個(gè)殘疾皇子驶赏,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,678評(píng)論 2 354