(已经解决了,我正在为下一个人写这个)
我在一台计算机上运行git守护程序并尝试与另一台计算机同步.
在计算机A上,我跑了:
git daemon --reuseaddr --base-path=. --export-all --verbose
Run Code Online (Sandbox Code Playgroud)
在电脑B上,我跑了:
git clone git://computerA/.git source # worked
cd source
git pull # worked
git push # failed with "fatal: The remote end hung up unexpectedly"
Run Code Online (Sandbox Code Playgroud)
在计算机A上,守护程序输出为:
[5596] Connection from 127.0.0.1:2476
[5596] Extended attributes (16 bytes) exist <host=localhost>
[5596] Request receive-pack for '/.git'
[5596] 'receive-pack': service not enabled for './.git'
[5444] [5596] Disconnected (with error)
Run Code Online (Sandbox Code Playgroud)
我要发布我发现的灵魂.如果您有更完整的答案,请继续添加.
我已经设置了一个带有Git存储库的linux盒子(使用xinetd).
我已经为git守护程序启用了receive-pack以启用推送到存储库.
这是我目前的测试工作流程:
mkdir的东西
cd某事
git init --bare
git clone git:// server/repo
(关于克隆空存储库的消息)
对克隆的存储库执行一些提交.
git push
得到这个消息:
Counting objects: 8, done.
Compressing objects: 100% (3/3) done,
Writing objects: 100% (6/6)
Run Code Online (Sandbox Code Playgroud)
这还没完成.我只介绍了一个小改动,所以这应该很快完成.
我在这里做错了吗?
我在Windows上使用Git 2.9.在使用git守护程序创建演示Git训练时,我遇到了SO_KEEPALIVE错误.
@Server
$ git daemon --base-path=. --enable=receive-pack --verbose
[18608] Ready to rumble
[18108] Connection from 127.0.0.1:61111
[18108] unable to set SO_KEEPALIVE on socket: No error
[18108] Extended attributes (16 bytes) exist <host=127.0.0.1>
[18108] Request receive-pack for '/hello-world.git'
@ACommitter
$ git push -u origin "john--01--create-app-saying-hello"
Run Code Online (Sandbox Code Playgroud)
为什么会这样?
git ×3