This question already has answers here:
Git, fatal: The remote end hung up unexpectedly
(49 answers)
Closed 1 year ago.
I pushed two commit changes, then it turned out I had to pull some changes that a coworker made. When I try to push I get this error:
>>> /usr/bin/git push origin HEAD:refs/heads/main
error: RPC failed; curl 55 Failed sending data to the peer
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date
Solutions I've tried without success:
git config --global http.postBuffer 524288000
git config --global http.version HTTP/1.1
try to do this
delete .git/ from your project
clone the remote repo to some new location like your desktop:
3.git clone https://github.com/foo/bar.git
4.move .git/ from the new location into the old location
re-commit and push your changes
Related
This question already has answers here:
Git: How to solve Permission denied (publickey) error when using Git?
(61 answers)
Closed 1 year ago.
I'm trying to git push my app's files, from my computer, to a VPS server running on Ubuntu.
On my computer(windows 10) I did:
git init
git add -A
git commit -m "......"
On the server(in the app's directory):
git init --bare
next did on my computer:
git remote add origin fruitos#
and when I try git push or git pull I get
Permission denied(publickey)
fatal: Could not read from remote repository
I've tried many things so far to solve it but still no solution.
any ideas?
The main goal is to upload the app's file straight from my computer(windows) to the vps server(Ubuntu) using the git push command.
Your git require a ssh-key to secure to communication between your sever and your client you need to take a look how how to setup private and public with this
It's much more easy than you think
a few of us use a bare repository on a network share ( u:\data\some_repo.git) and this works fine with the expected limitations
However, just recently I have been unable to perform any typical git activities associated with the bare respository: push pull clone.
All activities fail with:
fatal: 'u:\data\some_repo.git' does not appear to be a
git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository
exists.
I do have access and I can browse this location fine. If I copy some_repo.git to my local machine and do a git clone /c/Temp/some_repo.git it works.
There is no latency issue, I have full access, I have tried prepending file:/// with no luck. a GIT_TRACE does not show anything
GIT_TRACE=1 git clone "/u/data/some_repo.git" 12:52:37.433340
exec-cmd.c:237 trace: resolved executable dir:
C:/STORAGE/Application/Git/mingw64/bin 12:52:37.435332 git.c:444
trace: built-in: git clone u:/data/some_repo.git Cloning into
'InternalTestInterface'... 12:52:38.129124 run-command.c:663
trace: run_command: unset GIT_DIR; 'git-upload-pack
'''u:/data/some_repo.git'''' 12:52:38.370091 exec-cmd.c:237
trace: resolved executable dir:
C:/STORAGE/Application/Git/mingw64/libexec/git-core 12:52:38.370091
git.c:444 trace: built-in: git upload-pack
u:/data/some_repo.git fatal: 'Hu:/data/some_repo.git' does not appear
to be a git repository fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository
exists.
Any idea how to resolve this
--update--
as requested, attempting to perform a git init:
/u/data/test.git
$ git init error: fstat on
//FQDN.com/site_###/Groups/data/test.git/.git/config failed: Invalid
argument fatal: could not set 'core.filemode' to 'false'
I have the exact same setup at work, with the same network drive (also named U:\!)
And I had the same issue at some point, apparently due to some background synchronisation/backup process which was keeping an handle on some of the files of the Git bare repository.
Try first to see if you can re-create a separate bare repo, for testing, and push to it:
git init U:\data\test.git
cd path\to\local\repo
git remote add origin2 U:\data\test.git
git push origin2 master
I'm working on a Windows machine, from git bash.
We recently moved our project from a TFS server to a git repo on the same server. As far as I know, this was all done in one commit. I am remote.
When I run git clone <url> the clone will start, but at some seemingly arbitrary point (a different one every time), it will fail with:
error: RPC failed; curl 56 Recv failure: Connection was reset
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
I was thinking perhaps if there were a way to clone the repo a few files at a time, that would work. It seems unlikely that such a solution exists. I have tried increasing the http.postBuffer to 157286400, and I do not think switching to ssh is an option for us currently. A shallow clone is unhelpful, as there has only been one commit. These are the solutions I've seen elsewhere. Any help would be greatly appreciated.
I am trying to install my cocoa pods.
After doing everything and installing it i got the error :
[!] Unable to add a source with url git#github.com:CocoaPods/Specs.git named master-1
And to fix that error I tried:
cd ~/.cocoapods/repos
git clone https://github.com/CocoaPods/Specs.git master
Then I get this error which I don't know how to deal with:
remote: Counting objects: 854549, done.
remote: Compressing objects: 100% (3453/3453), done.
error: RPC failed; curl 56 SSLRead() return error -9806 MiB/s
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
The git clone is indeed what issue 4293 recommends.
But if the clone fails with a "RPC failed; result=56" error message, check your git buffer:
git config --global http.postBuffer 2M
Then try again your git clone.
If not, investigate with:
GIT_CURL_VERBOSE=1 git clone https://github.com/CocoaPods/Specs.git
Finally, if https does not want to cooperate, try the ssh url:
cd ~/.cocoapods/repos
git clone git#github.com:CocoaPods/Specs.git
Continuously try 3 times pod setup first and second time it fails. third time it works. Even if the third time fails run again it and continuously open a webpage or stream online videos, this will works. i have tested two times, one in 10.12sieraa
I got the same error message. In my case I resolved it by changing to http.
git clone https://github.com/CocoaPods/Specs.git master
When running the command git fetch github , I get the following error:
fatal: write error: Broken pipe93), 23.23 MiB | 635 KiB/s
fatal: index-pack failed.
I then get a "git.exe has stopped working" error message while Windows attempts to find a solution to the problem.
Running *GIT_TRACE=1 git fetch github* doesn't give any additional details.
Note: I can perform a git fetch github [branch name] directly and that works without error
When I try "Repository > Compress Database" in Git Gui, I get "Error: Command Failed". I get the same error when I try "Repository > Verify Database".
How do I get around this? It's almost like my local repo is corrupt.
System Info
*Git Bash: 1.7.4-preview20110204
Windows 7 64-bit*
Couple of options:
check if the problem persists in a new local repo (so, after re-cloning your GitHub repo)
check if raising the postBuffer size can alleviate the problem
git config --global http.postBuffer 524288000
(as mentioned in "The remote end hung up unexpectedly while git cloning")