2015-09-09 35 views
0

我有一個非常大的回購(>由於二進制資產1GB),該gitlab服務器安裝正確(醫生報告都可以),我創建了一個小混帳回購協議,其工作確定,推拉等。推動非常大的回購協議gitlab服務器

Username for 'http://x.y.z': tyoc213 Password for 'http://[email protected]': Counting objects: 4894, done. Compressing objects: 100% (4872/4872), done. error: RPC failed; result=55, HTTP code = 0 fatal: The remote end hung up unexpectedly Writing objects: 100% (4894/4894), 506.89 MiB | 12.27 MiB/s, done. Total 4894 (delta 2104), reused 0 (delta 0) fatal: The remote end hung up unexpectedly Everything up-to-date

我已經tryied改變git config http.postBuffer 5000或更大。

我甚至試圖從服務器(我的意思是我已經在服務器內部的混帳回購協議),以gitlab裏面推,但同樣的錯誤發生。

有沒有解決這個問題?我應該嘗試什麼?它怎麼可能是「一切都是最新的」?

+0

分享您的Nginx的配置文件先請。什麼是獨角獸超時? – Anatoly

回答

2

檢查config/unicorn.rb config

它包括:

# nuke workers after 30 seconds instead of 60 seconds (the default) 
# 
# NOTICE: git push over http depends on this value. 
# If you want be able to push huge amount of data to git repository over http 
# you will have to increase this value too. 
# 
# Example of output if you try to push 1GB repo to GitLab over http. 
# -> git push http://gitlab.... master 
# 
# error: RPC failed; result=18, HTTP code = 200 
# fatal: The remote end hung up unexpectedly 
# fatal: The remote end hung up unexpectedly 

這是不完全相同的錯誤,但問題可能有關。
Check your unicorn logs

對於「RPC failed; result=55」,見my old answer,並試圖增加日誌級別(GIT_CURL_VERBOSE=1 git push,見this example)和/或切換到SSH進行檢測,如果問題仍然存在。

如果你沒有看到在UNICOR記錄任何東西,就意味着永遠不會達到Gitlab。
如果您在前面有NGiNX,常見問題是its config for allowing large files。尋找client_max_body_size xxM;,並增加該值。

1

我只是碰到了類似的問題,甚至混帳配置不能夠解決這個問題。你會想改爲使用ssh。

如果您使用sourcetree,您可以執行以下操作。

  1. 創建SSH密鑰並將其導入到你的帳戶gitlab https://gitlab.com/help/ssh/README

  2. 在SourceTree

    >工具>添加SSH密鑰>選擇您這是本地創建(id_rsa.pub)

  3. SSH

    轉到您正在處理的回購>設置(右上角)

  4. 在遙控器標籤下>添加>輸入名稱和您的ssh鏈接([email protected]:xxxxxxxxxx/xxxxxx xxx.git)

  5. 一次添加一個新的遠程回購會顯示出來,然後點擊右鍵,使用ssh獲取回購

  6. 現在你可以推到回購

之後你有一個非常大的倉庫工作時可以取消HTTPS遠程回購

0

另一種選擇是將其推入階段。有一個Amazon AWS CodeCommit示例腳本,它創建標籤(將存儲庫批量分配到每個X#提交中),然後推送標籤之間的提交。

坐落在: http://docs.aws.amazon.com/codecommit/latest/userguide/how-to-push-large-repositories.html#how-to-push-large-repositories-sample

有從這個網址一些其他的選擇,以及包括使用git gc --aggressive前推,以減少庫的大小:

Git, fatal: The remote end hung up unexpectedly