Git:设置守护进程的麻烦,git clone的问题 [英] Git: trouble with setting up daemon, trouble with git clone
问题描述
在一台Windows笔记本电脑上,我正在运行(在cygwin下):
git daemon --base-path = / cygdrive / c / work / proj /
我的项目的根目录是c:有一个c:\ work \proj\proj1\.git目录。
git-daemon-export-ok存在于c:\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ (git-daemon-export-ok可以是空文件,是吗?)
在另一台Windows计算机上,在同一个本地网络上,我尝试了很多变体这个(在cygwin下):
$ g $ clone git://xx.xx.xx.xx/proj1
我期待守护进程将'proj1'附加到基路径并做正确的事情。
在服务器上,我看到:
5728]'/ cygdrive / c / work / proj / proj1 / .git':存储库未导出。
在客户端上,我看到:
$ git clone git://xx.xx.xx.xx/proj1
在/cygdrive/c/work/proj/proj1/.git/ $ b中初始化了空的Git仓库$ b致命:远程终端意外挂断
我做错了什么?
TIA ...
您需要创建 git-daemon-export-ok 文件放在 .git
目录中。不要将它与代码一起提交到存储库中,只需创建一个带有该名称的空文件以及分支,
钩子
, info
等目录。
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...
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:设置守护进程的麻烦,git clone的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!