Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Stash "The remote end hung up unexpectedly"

I'm recently not able to push into one remote stash repository.

I have 10 repositories on the server and all others are working fine.

I checked the repository with git fsck and it seems to be ok.

Using a windows server (2008r2) with latest stash and msysgit 1.9.2 on server and client side.
I also tried increasing the http.postBuffer to 512mb.

I get the following errors on client side:

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
POST git-receive-pack (13411325 bytes)

fatal: The remote end hung up unexpectedly

fatal: The remote end hung up unexpectedly

error: RPC failed; result=56, HTTP code = 0

Pushing to

Everything up-to-date

And on the server side:

2014-04-27 12:49:05,120 DEBUG [http-bio-7990-exec-7] XXXX 766x1803x0 1y1ndk7,[::1]:59732,0:0:0:0:0:0:0:1 "POST /scm/p/dev.git/git-receive-pack HTTP/1.1" com.atlassian.stash.scm.BaseCommand Executed C:\Program Files (x86)\Git\cmd\git.exe http-backend

2014-04-27 12:49:05,120 ERROR [http-bio-7990-exec-7] XXXX 766x1803x0 1y1ndk7,[::1]:59732,0:0:0:0:0:0:0:1 "POST /scm/p/dev.git/git-receive-pack HTTP/1.1" c.a.s.i.s.g.p.h.GitSmartExitHandler Request for repo 'dev' of project 'p' from 'XXXXXXX' failed: write process 'C:\Program Files (x86)\Git\cmd\git.exe http-backend ' caused an exception

2014-04-27 12:49:05,128 DEBUG [http-bio-7990-exec-7] XXXX 766x1803x0 1y1ndk7,[::1]:59732,0:0:0:0:0:0:0:1 "POST /scm/p/dev.git/git-receive-pack HTTP/1.1" c.a.s.i.s.g.p.h.GitSmartExitHandler process error:
com.atlassian.utils.process.ProcessException: java.lang.RuntimeException: Failed to copy request input stream to SCM hosting process input.
at com.atlassian.utils.process.ExternalProcessImpl.handleHandlerError( ~[atlassian-processutils-1.6.0-m1.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl.access$100( ~[atlassian-processutils-1.6.0-m1.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl$AbstractHandlerRunnable.onError( ~[atlassian-processutils-1.6.0-m1.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl$InputHandlerRunnable.onError( ~[atlassian-processutils-1.6.0-m1.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl$AbstractHandlerRunnable.doTask( ~[atlassian-processutils-1.6.0-m1.jar:na]
at ~[atlassian-processutils-1.6.0-m1.jar:na]
at com.atlassian.stash.internal.concurrent.StateTransferringExecutor$ ~[stash-platform-2.12.0.jar:na]
at java.util.concurrent.ThreadPoolExecutor.runWorker( ~[na:1.7.0_51]
at ~[na:1.7.0_51]
... 1 frame trimmed
Caused by: java.lang.RuntimeException: Failed to copy request input stream to SCM hosting process input.
at com.atlassian.stash.web.cgi.CgiInputHandler.process( ~[stash-scm-common-2.12.0.jar:na]
at com.atlassian.stash.scm.SummarizingProcessHandler$DelegatingOutputStreamHandler.process( ~[stash-spi-2.12.0.jar:na]
at com.atlassian.stash.scm.SummarizingProcessHandler.provideInput( ~[stash-spi-2.12.0.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl$InputHandlerRunnable.process( ~[atlassian-processutils-1.6.0-m1.jar:na]
at com.atlassian.utils.process.ExternalProcessImpl$AbstractHandlerRunnable.doTask( ~[atlassian-processutils-1.6.0-m1.jar:na]
... 5 common frames omitted
Caused by: Connection reset
at ~[na:1.7.0_51]
at ~[na:1.7.0_51]
at com.atlassian.stash.web.cgi.BaseCgiHandler.copyStream( ~[stash-scm-common-2.12.0.jar:na]
at com.atlassian.stash.web.cgi.CgiInputHandler.process( ~[stash-scm-common-2.12.0.jar:na]
... 9 common frames omitted

Any ideas on this?

3 answers

It's kind of late, but for anyone else stumbling across this question, try entering this in your Git shell:

git config --global http.postBuffer 524288000

The reason this works is when remote requests exceed a certain size threshold, the Git client tries to use chunked-transfer encoding. Some web servers (IIS, NginX) aren't configured to allow that by default. The threshold is set quite small by default; this sets the threshold to a huge value so it should never become an issue.

Thanks a million, @Tim Long, it solved it for me.

Hi there,

Do you have any proxy between Stash and the client? (like apache)

If yes, are you able to try bypassing the proxy using ip:port?

Also, could you please do a test pushing content using ssh+git and let me know how these tests go?


Celso Yoshioka

I have the same problem. Connects directly host:port of Stash.
When I connect to git+ssh everything worked perfectly.
Please help.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Training & Certification

Atlassian Cloud 101: Start quickly with free training

Free training for Jira, Confluence, and Jira Service Management Start faster and be more productive with Atlassian cloud products. Take the guess work out of where to begin, and gain confidence wi...

80 views 3 9
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you