Git存储库未导出:致命:远程端意外挂断 [英] Git repository not exported: fatal: The remote end hung up unexpectedly

查看:74
本文介绍了Git存储库未导出:致命:远程端意外挂断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置新的git安装.

在一台Windows笔记本电脑上,我正在运行(在cygwin下):

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

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

我的项目的根目录是c:\ work \ proj \ proj1.有一个c:\ work \ proj \ proj1 \ .git目录.
git-daemon-export-ok存在于c:\ work \ proj \ proj1中. (git-daemon-export-ok可以是一个空文件,是吗?)

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?)

在同一本地网络上的另一台Windows计算机上,我已经尝试了这种变化(在cygwin下):

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  

我希望守护程序将'proj1'附加到基本路径并执行正确的操作.

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

在服务器上,我看到:

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

在客户端上,我看到:

$ 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

我做错了什么?
TIA ...

What am I doing wrong?
TIA...

推荐答案

您需要在.git目录中创建 git-daemon-export-ok 文件.不要将其与代码一起提交到存储库中,而只需创建一个具有该名称的空文件以及brancheshooksinfo等目录.

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.

这篇关于Git存储库未导出:致命:远程端意外挂断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆