问题
While I trying to push some commits to remote server, I get this response (after waiting about 5 minutes):
git.exe push --progress "origin" events_devel:events_devel
Counting objects: 195, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (41/41), done.
Writing objects: 100% (47/47), 475.15 KiB | 0 bytes/s, done.
Total 47 (delta 32), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
error: RPC failed; result=7, HTTP code = 401
Everything up-to-date
I was try this: https://stackoverflow.com/a/6849424, but same result. Remote server not GitHub... its the corporate server. Pulling works as it should.
回答1:
There is a problem with the stable Git for Windows (1.9.5) for updating using http and windows or basic auth.
Try to upgrade to the 2.4.6-release candidate version. You can find it here
Source
回答2:
This is most likely some network issue on the remote side.
Try using different protocol instead, such as ssh.
To debug the issue, you can specify some extra variables for git command, e.g.
GIT_TRACE=1 GIT_TRACE_PACK_ACCESS=1 GIT_CURL_VERBOSE=1 GIT_TRACE_CURL=1 GIT_TRACE_PACKET=1 git push --progress origin
For SSH issues, try:
echo 'ssh -vvv $*' > ssh && chmod +x ssh
GIT_SSH="$PWD/ssh" git push --progress origin
Or use strace
to debug the process, e.g.
strace -f git push
See also: How can I debug git/git-shell related problems?
来源:https://stackoverflow.com/questions/31719275/git-error-while-push-error-rpc-failed-result-7-http-code-401