2

I cloned a remote repository using: git clone --depth 1 --branch branch-name repo-url

Then made changes and tried to push the code to remote repo - it failed with message -

error: RPC Failed; HTTP 500 curl 22 The requested URL returned error: 500 Internal Server Error fatal: The remote hung up unexpectedly fatal: The remote hung up unexpectedly

This error comes every time i try shallow clone with --depth 1 option. While cloning the branch with full history, the push goes through perfectly fine.

I am using GIT v2.10.2. Tried with both Git Bash and SourceTree. Its the same behavior every time.

Any suggestions on how to get around this as I do not want to clone the full history of commits every time.

S B J
  • 21
  • 3

1 Answers1

0

Error 500 is a server-side error

This is a 'catch-all' error generated by the Web server. Basically something has gone wrong, but the server can not be more specific about the error condition in its response to the client.

In addition to the 500 error notified back to the client, the Web server should generate some kind of internal error log which gives more details of what went wrong.

So it is not so much a Git or SourceTree (client-side) error, as it is a snafu on the remote server-side: depending on where you are pushing, you should check on that server (or contact the support for that Git repository hosting service) to see what is going on (here: to see if shallow cloning/pushing is supported, since it should be with Git 2.9)

Community
  • 1
  • 1
VonC
  • 1,042,979
  • 435
  • 3,649
  • 4,283