1. 程式人生 > >error: RPC failed; HTTP 502 curl 22 The requested URL returned error: 502 Proxy Error fatal: 報錯

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

  1. 錯誤訊息:

error: RPC failed; result=22 HTTP code = 413

….

fatal: The remote end hung up unexpectedly.

  1. error: 無法推送一些引用到 ‘https:…..something.git’

  2. 如果你遇到了錯誤:

in ‘connect’: SSL_connect returned=1 error=0 state=SSLv3 read server cerificate B:cerificate verify failed(OpenSSL::SSL::SSLError)

。。。

remote rejected master -> master (pre-receive hook declined)

可能是你找錯方法了,這時改回https方式的remote url:

git remote set-url origin https://… your.git

解決方法:

  1. 設定gitlab的object size 大小

sudo editor /home/git/gitlab/config/gitlab.yml

將”max_size:20000000”改成需要的bytes.

  1. 設定nginx 的client_max_body_size

sudo editor /etc/nginx/sites-enabled/gitlab-ssl

設定client_max_body_size為:

client_max_body_size 1024M;

3.設定postBuffer

單獨專案設定:

git config http.postBuffer 1024000000

全域性設定:

git config –global http.postBuffer 1024000000

4.重啟服務

sudo service gitlab restart

sudo service nginx restart

  1. 再次push時可能需要

git push -f origin +master