Git Problem And Resolution

  • Problem: Git Push Fails - fatal: The remote end hung up unexpectedly

Attention: This resolution comes from:
https://confluence.atlassian.com/stashkb/git-push-fails-fatal-the-remote-end-hung-up-unexpectedly-282988530.html

  • description

When users try to run "git push" the following error message is shown:

$ git push
Counting objects: 2332669, done.
Delta compression using up to 16 threads.
Compressing objects: 100% (360818/360818), done.
error: RPC failed; result=22, HTTP code = 411
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2332669/2332669), 483.30 MiB | 114.26 MiB/s, done.
Total 2332669 (delta 1949888), reused 2330461 (delta 1949349)
fatal: The remote end hung up unexpectedly
  • Cause

The "Smart HTTP" protocol in Git uses "TransferEncoding:chunked" in POST requests
when it contains packed objects greater than 1MB in size.
Some proxy servers, like Nginx, do not support this transfer encoding by default, 
and the requests will be rejected before they get to Stash. 
Because of this, the Stash logs will not show any extra information.
  • Workaround

When pushing a large amount of data (initial push of a big repository, change with very big file(s))
may require a higher http.postBuffer setting on your git client (not the server).
From https://www.kernel.org/pub/software/scm/git/docs/gitconfig.html
Configuration on your reverse proxy. 
Usually ngnix the parameter client_max_body_size is a blocker. 
The reverse proxy may also have a connection timeout 
that's closing the connection(e.g. TimeOut or ProxyTimeout in apache, 
proxy_read_timeout in ngnix). Try bypassing the proxy by pushing 
directly to Stash IP:port. If this works, it's highly likely that the proxy
server is causing the early disconnect and needs to be tuned.
User is using an outbound proxy on his machine that is causing the issue.
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末哎媚,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌猿推,老刑警劉巖克滴,帶你破解...
    沈念sama閱讀 218,204評(píng)論 6 506
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件漫蛔,死亡現(xiàn)場(chǎng)離奇詭異蕉堰,居然都是意外死亡旅掂,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 93,091評(píng)論 3 395
  • 文/潘曉璐 我一進(jìn)店門什荣,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)矾缓,“玉大人,你說(shuō)我怎么就攤上這事稻爬∈任牛” “怎么了?”我有些...
    開(kāi)封第一講書人閱讀 164,548評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵桅锄,是天一觀的道長(zhǎng)琉雳。 經(jīng)常有香客問(wèn)我,道長(zhǎng)友瘤,這世上最難降的妖魔是什么翠肘? 我笑而不...
    開(kāi)封第一講書人閱讀 58,657評(píng)論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮商佑,結(jié)果婚禮上锯茄,老公的妹妹穿的比我還像新娘。我一直安慰自己茶没,他們只是感情好肌幽,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,689評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布。 她就那樣靜靜地躺著抓半,像睡著了一般喂急。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上笛求,一...
    開(kāi)封第一講書人閱讀 51,554評(píng)論 1 305
  • 那天廊移,我揣著相機(jī)與錄音,去河邊找鬼探入。 笑死狡孔,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的蜂嗽。 我是一名探鬼主播苗膝,決...
    沈念sama閱讀 40,302評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼植旧!你這毒婦竟也來(lái)了辱揭?” 一聲冷哼從身側(cè)響起,我...
    開(kāi)封第一講書人閱讀 39,216評(píng)論 0 276
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤病附,失蹤者是張志新(化名)和其女友劉穎问窃,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體完沪,經(jīng)...
    沈念sama閱讀 45,661評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡域庇,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,851評(píng)論 3 336
  • 正文 我和宋清朗相戀三年,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片较剃。...
    茶點(diǎn)故事閱讀 39,977評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡咕别,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出写穴,到底是詐尸還是另有隱情惰拱,我是刑警寧澤,帶...
    沈念sama閱讀 35,697評(píng)論 5 347
  • 正文 年R本政府宣布啊送,位于F島的核電站偿短,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏馋没。R本人自食惡果不足惜昔逗,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,306評(píng)論 3 330
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望篷朵。 院中可真熱鬧勾怒,春花似錦、人聲如沸声旺。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 31,898評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)腮猖。三九已至鉴扫,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間澈缺,已是汗流浹背坪创。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 33,019評(píng)論 1 270
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留姐赡,地道東北人莱预。 一個(gè)月前我還...
    沈念sama閱讀 48,138評(píng)論 3 370
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像项滑,于是被迫代替她去往敵國(guó)和親依沮。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,927評(píng)論 2 355

推薦閱讀更多精彩內(nèi)容