0

Tried to upload my react file to a GitHub repository. I have committed all of my files, I'm sure of that. This is the error im getting:

PS C:\Users\user\Desktop\brown-react\brown> git push -u origin main
Enumerating objects: 52, done.
Counting objects: 100% (52/52), done.  
Delta compression using up to 8 threads
Compressing objects: 100% (50/50), done.
error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: CANCEL (err 8)
send-pack: unexpected disconnect while reading sideband packet
Writing objects: 100% (52/52), 14.06 MiB | 221.00 KiB/s, done.
Total 52 (delta 0), reused 0 (delta 0), pack-reused 0
fatal: the remote end hung up unexpectedly
Everything up-to-date

Commit command result:

PS C:\Users\user\Desktop\brown-react\brown> git commit
On branch main
nothing to commit, working tree clean
PS C:\Users\user\Desktop\brown-react\brown> 
Matt
  • 12,848
  • 2
  • 31
  • 53
brown
  • 31
  • 1
  • 7

2 Answers2

1

Solution 1:

Try increasing the buffer size

git config --global http.postBuffer 157286400

https://confluence.atlassian.com/bitbucketserverkb/git-push-fails-fatal-the-remote-end-hung-up-unexpectedly-779171796.html

Solution 2:

Downgrade and upgrade HTTP version as suggested here:-

https://stackoverflow.com/a/66014581/5898385

Sumit Parakh
  • 1,098
  • 9
  • 19
0

Try

  • git remote rm origin then
  • git remote add origin git@github.com:username/project.git (replace username with your username and project with your project name)

Check out this answer for further reference Git, fatal: The remote end hung up unexpectedly