Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git repository not exported: fatal: The remote end hung up unexpectedly

Setting up new git installations.

On one Windows laptop, I'm running (under cygwin):

git daemon --base-path=/cygdrive/c/work/proj/  

My project's root is c:\work\proj\proj1. There is a c:\work\proj\proj1\.git directory.
git-daemon-export-ok exists in c:\work\proj\proj1. (git-daemon-export-ok can be an empty file, yes?)

On another Windows computer, on the same local network, I've tried many variations of this (under cygwin):

git clone git://xx.xx.xx.xx/proj1  

I expect that the daemon will append 'proj1' to the base-path and do the right thing.

On the server I see:

5728] '/cygdrive/c/work/proj/proj1/.git': repository not exported.

On the client I see:

$ git clone git://xx.xx.xx.xx/proj1
Initialized empty Git repository in /cygdrive/c/work/proj/proj1/.git/  
fatal: The remote end hung up unexpectedly

What am I doing wrong?
TIA...

like image 813
Number8 Avatar asked Jul 11 '09 01:07

Number8


People also ask

How do you solve fatal the remote end hung up unexpectedly?

Solution. To solve the issue, change the settings of your buffer so that you have enough space available. You can increase the buffer value up to 2000000000.

How do I fix git failed fatal error?

Head over to the Git website and install the latest version of Git for Windows. Go back into the Visual Studio installer and tick "Git for Windows" again. It will not download a new version even though it may look like it is. After that is done, your Git should be fine with VSTS and TF Explorer.

How do you fix fatal origin does not appear to be a git repository?

Conclusion. The “fatal: 'origin' does not appear to be a git repository” error occurs when you try to push code to a remote Git repository without telling Git the location of the remote repository. To solve this error, use the git remote add command to add a remote to your project.


2 Answers

You need to create the git-daemon-export-ok file in the .git directory. Don't commit it into the repository along with your code, but just create an empty file with that name along with the branches, hooks, info, etc. directories.

like image 190
Ted Percival Avatar answered Sep 29 '22 18:09

Ted Percival


i had this same issue, but for a different reason. if Ted's answer doesn't work for you, try adding "--enable=receive-pack" to your git-daemon options. this did the trick for me.

like image 36
moonlightcheese Avatar answered Sep 29 '22 17:09

moonlightcheese