Troubleshooting Git via Stash
June 18, 2014
I have a Git repository set up on Stash from Atlassian. I've just done my first push to it and encountered the following issues:
Problem 1 - error: RPC failed; result=55, HTTP code = 0
Whilst pushing, I got the following error:
C:\dev\code>git push origin master Password for 'http://user@server.com': Counting objects: 3128, done. Delta compression using up to 4 threads. Compressing objects: 100% (3019/3019), done. error: RPC failed; result=55, HTTP code = 0 fWatal: The remote end hung up unexpectedly Writing objects: 100% (3128/3128), 29.83 MiB | 849.00 KiB/s, done. Total 3128 (delta 746), reused 0 (delta 0) fatal: The remote end hung up unexpectedly Everything up-to-date
This was fixed by issuing the following at the command line:
C:\dev\code>git config http.postBuffer 524288000
Problem 2 - HTTP 413
I got the following error whilst pushing:
C:\dev\code>git push origin master Password for 'http://user@server.com': Counting objects: 3128, done. Delta compression using up to 4 threads. Compressing objects: 100% (3019/3019), done. Writing objects: 100% (3128/3128), 29.83 MiB | 7.61 MiB/s, done. Total 3128 (delta 746), reused 0 (delta 0) error: RPC failed; result=22, HTTP code = 413 fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly Everything up-to-date
This was because I was proxying through NGINX. I needed to modify the NGINX config for stash to allow large files through using client_max_body_size
:
server { listen 80; server_name server.com; client_max_body_size 50M; location / { proxy_pass http://localhost:7990; proxy_set_header X-REAL-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $host; } }
References
- http://stackoverflow.com/questions/11968353/cannot-push-to-remote-git-repository http://stackoverflow.com/questions/7489813/github-push-error-rpc-failed-result-22-http-code-413