1. 程式人生 > >Git提交程式碼push的時候報錯:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

Git提交程式碼push的時候報錯:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

今天我想rk的sdk包裡面的一些東西提交到我的git伺服器上,結果,總是報錯,折騰了一下午,結果才解決。

首先看看我提交程式碼的時候,報錯的資訊:

git.exe push --progress "origin" master:master

Counting objects: 43142, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (25108/25108), done.
Writing objects: 100% (43142/43142), 824.64 MiB | 26.18 MiB/s, done.
Total 43142 (delta 14030), reused 43141 (delta 14030)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large
Everything up-to-date


git did not exit cleanly (exit code 1) (717417 ms @ 2016/11/1 15:57:57)

 網上搜了一下,我以為跟上次我pull的時候報錯git clone: error: RPC failed; result=18, HTTP code = 200 解決辦法的解決方法一樣哦,結果我始終修改http.postBuffer的大小,改大改小都試過,但提交到一定大小以後,老是會出現上述的報錯資訊。

後面結合http://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413中的內容,以及http://blog.csdn.net/passion_wu128/article/details/8234901博文的內容,我瞭解到上述的這種報錯:

這跟Git的postBuffer變數值沒有關係。

(如果code = 411,則是由postBuffer引起的,可以在客戶端執行

git config --global http.postBuffer 52428800,改為最大50M)

解決方法其實能通過ssh提交來解決,所以實在沒辦法,我使用ssh來提交,而不用之前的http方法,最後證明可行。

這裡記錄下使用ssh提交程式碼和生成公鑰的過程。

這個過程,我借鑑http://www.cnblogs.com/ChenRihe/p/Git_TortoiseGit_SSH.html的部分內容做參考:

1.如果沒配置過使用者名稱和密碼(配過也再來一次咯):

git config --global user.name "John Doe"
git config --global user.email "[email protected]"

下圖抄的..

2.建立SSH和複製公鑰到剪下板(如複製以下程式碼執行出現引數過多提示,一般由於字元問題,需自己手打以下程式碼)

ssh-keygen –t rsa –C "[email protected]"

clip < ~/.ssh/id_rsa.pub

下圖抄的..

3.生成ssh公鑰以後,我們先cat一下公鑰,在git bash中輸入cat ~/.ssh/id_rsa.pub,這個時候會顯示出我們生成的公鑰,這時候拷貝公鑰,在我們git的賬戶中新增ssh就OK。

 

4.設定remote url,在git bash中輸入:

git remote set-url origin [email protected]:GitRepoName.git

github.com是你的伺服器域名,例如你用開源中國的碼雲的話,這個地方就是[email protected]

GitRepoName.git是git倉庫名。

5.提交程式碼,git push origin master

使用ssh提交程式碼,比使用http不但能解決413的大檔案報錯,同時還能提高提交程式碼的速度,從我提交的速度來看,他最少能夠提升100%的速度,所以還是使用ssh吧。

相關推薦

Git提交程式碼push的時候:HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

今天我想rk的sdk包裡面的一些東西提交到我的git伺服器上,結果,總是報錯,折騰了一下午,結果才解決。 首先看看我提交程式碼的時候,報錯的資訊: git.exe push --progress "origin" master:master Counting obj

使用git提交時報error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request Entity Too Large

bubuko alt buffer 依然 ads .post oba con 分享圖片 Delta compression using up to 4 threads.Compressing objects: 100% (2364/2364), done.Writing

使用giterror: RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out

使用git clone程式碼的時候報如下錯誤: Cloning into 'FanHeIOSV2'... error: RPC failed; HTTP 504 curl 22 The request

error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error fatal:

錯誤訊息: error: RPC failed; result=22 HTTP code = 413 …. fatal: The remote end hung up unexpectedly. error: 無法推送一些引用到 ‘https:…

git clone 遭遇 RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out The

今天從碼雲上clone一個專案,等待一會後,一直提示RPC failed; HTTP 504 curl 22 The requested URL returned error: 504 Gateway Time-out The remote end hung up unex

error: RPC failed; HTTP 411 curl 22 The requested URL returned error: 411 Length Required

If you attempt to push a large set of changes to a Git repository with HTTP or HTTPS, you may get an error message such as error: RPC failed; result=22, H

git推送到githuberror: The requested URL returned error: 403 Forbidden while accessing https://github.com

rep 發的 rac adc lob hub sta stat forward 最近使用git命令從github克隆倉庫到版本,然後進行提交到github時報錯如下: [[email protected]/* */ git_test]# git push ori

vs2015 git push程式碼的時候出現The requested URL returned error: 403

在windows下使用visual studio 向coding.net push專案的時候出現了這樣的錯誤: The requested URL returned error: 403 錯誤的原因可能是我之前使用過一個不同的coding.net的賬號(使用者名稱和密碼

解決git clone時報The requested URL returned error: 401 Unauthorized while accessing

版本問題,最直接的解決辦法就是重新編輯安裝git吧: 1. 下載:# wget -O git.zip https://github.com/git/git/archive/master.zip

解決github push錯誤The requested URL returned error: 403 Forbidden while accessing

github push錯誤: git push error: The requested URL returned error: 403 Forbidden while accessing https://github.com/wangz/future

Push failed fatal: unable to access 'https://github.The requested URL returned error: 403

今天push程式碼到github上面時, 一直報這個錯誤。 Push failed: Failed with error: fatal: unable to access 'https://github.com/xxx/UI_design_demo.git

git提交代碼 trailing whitespace的解決方法

div 執行 -s ace space mod 代碼 ont rail 禁止執行pre-commit腳本 進入到項目目錄中 chmod a-x .git/hooks/pre-commitgit提交代碼報錯 trailing whitespace的解決方法

Git提交到GitHub:Updates were rejected because the remote contains work that you do not have locally

轉自:https://blog.csdn.net/u011284073/article/details/81609707  在使用Git將本地專案上傳到GitHub上時,鍵入命令: git push -u origin master 報錯提示:Updates were reject

git push "Updates were rejected because the tip of your current branch is behind"

在Android原始碼的修改過程中,在把本地的分支push到伺服器的時候遇到如下錯誤: error: failed to push some refs to '[email protect

tomcat熱部署:Tomcat return http status error: 413, Reason Phrase: Request Entity Too Large

一、問題       tomcat熱部署的時候使用的是域名上傳到遠端伺服器,總是報錯。Tomcat return http status error: 413, Reason Phrase: Request Entity Too Large。         二、解決

三個思路解決413 Request Entity Too Large處理

  最近一個專案當中,要求上傳圖片,並且限制圖片大小,雖然在laravel當中已經添加了相關的表單驗證來阻止檔案過大的上傳,然而當提交表單時,還沒輪到laravel處理,nginx就先報錯了。當你仔細

上傳圖片(檔案)在本地沒問題,伺服器上報413(Request Entity Too Large)

上傳這個問題困了我幾個小時才找到原因。 原因:伺服器使用了nginx,nginx預設的上傳檔案大小為1M,所以如果想上傳更大的檔案,就需要修改nginx的配置檔案。 操作:在nginx的配置檔案中的server下的server_name下,新增 client

【PROJECT】HTTP 413錯誤Request entity too large問題原因

問題情景 瀏覽器或客戶端向伺服器POST資料的時候,因為傳輸收據太大出現的錯誤 問題原因 根據個人經驗,出現該問題原因如下: 1. 伺服器配置 2. nginx配置 nginx預設post請

nginx 出現413 Request Entity Too Large問題的解決方法

upload 使用 {} filesize onf 服務 限制 允許 應該 nginx 出現413 Request Entity Too Large問題的解決方法 使用php上傳圖片(大小1.9M),出現 nginx: 413 Request Entity Too La

Nginx出現413 Request Entity Too Large錯誤

Nginx Nginx 413錯誤 一. 問題出現 使用phpMyAdmin管理mysql數據,使用圖形界面導入sql語句時報錯,報錯內容如下: 二. 問題原因 出現了413錯誤,413錯誤是因為用戶請求body的數據大於設置的值。用戶請求的body的值可用Content-Length看到 可以看