【Jenkins】發布報錯“error: RPC failed; curl 18 transfer closed with outstanding read data remaining”


報錯信息:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

       at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735)
       ... ...

  本來Jenkins都是正常的,但是突然構建一個job的時候出現了此報錯,然后Jenkins上所有的job構建都不成功,同樣報這種錯誤。在網上查找一些資料,最終確認是git的http.postBuffer配置默認值大小的問題,此配置是用來限制git推送大小的,由於代碼里有大文件導致拉取代碼時postBuffer溢出,所以需要增大http.postBuffer的值。

 

  解決方法:在服務器上使用命令修改,執行命令時使用Jenkins用戶執行

su - jenkins -c "git config --global http.postBuffer 524288000"

  但是,執行后必須要重啟Jenkins,不然不會生效的。隨后就能在Jenkins的家目錄下面看到配置文件 .gitconfig

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM