Getting rpc error when trying to push code from local to remote repository in github

Course - Python fast api development

Description of the issue:
When pushing the code from local to remote repository in github, getting the below error

The below issue occurred when user gives the command - git push origin main

Enumerating objects: 2887, done.
Counting objects: 100% (2887/2887), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2800/2800), done.
error: RPC failed; HTTP 400 curl 22 The requested URL returned error: 400
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (2887/2887), 14.50 MiB | 4.01 MiB/s, done.
Total 2887 (delta 326), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

Hi @Vigneshwar-M-S

The logs suggest the push operation is returning a HTTP 400 error, which could be due to different reasons, like incorrect remote URL, authentication, etc.

I suggest you try the following commands and try again:

  • Check the remote URL: git remote -v
  • set the remote URL: git remote set-url origin <URL copied from above command>

Then try to push again with git push origin main

Regards.

git config --global http.postBuffer 524288000

The above command worked