Git error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 send-pack: unexpected disconnect while reading sideband packet
Asked Answered
S

3

9

I'm trying to upload a number of files and folders to my private GitHub repository. However, when I open my private repository on GitHub, I can't see the files and folders that I've pushed.

I've been using the command git push origin master to push my code.

I'm receiving the following error message:

RPC failed; HTTP 400 curl 22 The requested URL returned error: 400 send-pack: unexpected disconnect while reading sideband packet

Pic of Error Message: enter image description here

How do I resolve this error and view the files and folders in my private GitHub repository?

Saffren answered 21/1 at 18:5 Comment(0)
C
35

If you're encountering errors while pushing to a remote Git repository, it might not necessarily be your internet connection; it could be related to the buffer size.

Solutions:

  1. Increase the buffer size: You can adjust the buffer size to prevent this error. Run the following command in your terminal:

    git config http.postBuffer 524288000
    
  2. Push smaller batches of changes: If you're attempting to push a large number of changes at once, it could overwhelm the remote repository. Consider pushing smaller batches of changes instead.

  3. Contact GitHub support: If none of the above solutions work, it might be beneficial to reach out to GitHub support for further assistance.

These steps should help address the issue you're experiencing with pushing to the remote repository.

The answer comes directly from this discussion by Paweł Trojański

Clack answered 31/3 at 0:34 Comment(4)
/help/referencingImamate
Resolved on my device by the following command. Thank you.Keefe
This solution is worked for me with Android Studio IDE. Thanks in advanceRefer
Thanks, it was a size issue for me aswell... would be nice to have more informative error message from github side.Gurango
J
4

Run the command git config --global http.postBuffer 157286400 in my terminal and this works for me.

Jussive answered 21/8 at 10:7 Comment(0)
S
-1

This works for me.

  1. first check your connection.
  2. make changes stage and commit, with the command => git add . and git commit -m "message"
  3. run git push origin branch-name
Sparke answered 25/1 at 21:46 Comment(1)
It doesn't answer the question.Tomtit

© 2022 - 2024 — McMap. All rights reserved.