简体   繁体   English

Git推送到LAN存储库停止或停止而没有错误

[英]Git push to LAN repo stalls or stops without error

Intent 意图

I intend to establish a version control service in a windows local network. 我打算在Windows本地网络中建立版本控制服务。

Test Environment 测试环境

I have a /root folder where there are 2 repos /foo and /bar 我有一个/root文件夹,其中有2个仓库/foo/bar

Attempts 尝试次数

I was advised to use a git-daemon service ( http://git-scm.com/docs/git-daemon ) but it's been more complicated to implement (and works differently) from advertised. 有人建议我使用git-daemon服务( http://git-scm.com/docs/git-daemon ),但实现(和工作方式)与广告宣传相比更加复杂。

The first guide i found was http://railsware.com/blog/2013/09/19/taming-the-git-daemon-to-quickly-share-git-repository/ . 我发现的第一个指南是http://railsware.com/blog/2013/09/19/taming-the-git-daemon-to-quickly-share-git-repository/ I used their git daemon options in the '/root' folder that would serve all repos contained therein: 我在'/ root'文件夹中使用了他们的git daemon选项,该选项将为其中包含的所有存储库提供服务:

$ git daemon --base-path=. --export-all --reuseaddr --informative-errors --verbose

I was succesful in cloning an empty repo but when I added some content this the message i got: 我成功克隆了一个空的仓库,但是当我添加一些内容时,我得到了以下消息:

$ git clone git://root-ip-addr/bar

Cloning into 'bar'...

remote: Counting objects: 3, done.

remote: Total 3 (delta 0), reused 0 (delta 0)

fatal: read error: Invalid argument

Receiving objects: 100% (3/3), done.

fatal: error in sideband demultiplexer

Next i found http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/ where they don't even mention the daemon but instead went for a local-folder-as-remote aproach. 接下来,我找到了http://www.gitguys.com/topics/creating-a-shared-repository-users-sharing-the-repository/ ,他们甚至没有提到守护程序,而是去了本地文件夹-as -远程方式。 I still think I need a daemon so what I tried was making my repos bare while adding the -enable:receive-pack option on the daemon. 我仍然认为我需要一个守护程序,因此我尝试在守护程序上添加-enable:receive-pack选项的同时裸露我的-enable:receive-pack

They advise to use branches on the client machines to commit so I did. 他们建议使用客户端计算机上的分支进行提交,所以我这样做了。 I also committed to the master branch to see what happens. 我还致力于master分支,看看会发生什么。 In both cases GIT seems to stall. 在这两种情况下,GIT似乎都停止了。

Here is a screenshot of the client machine attempting to push to the central hub. 这是客户端计算机尝试推送到中央集线器的屏幕快照。 You can see that it stalls at that point. 您会看到它停在了那一点。

尝试从客户端推送时

Here is a screenshot of the central hub running the daemon. 这是运行守护程序的中央集线器的屏幕截图。

守护程序响应

I can only key in ctrl+c to stop the git daemon altogether after that. 在那之后,我只能输入ctrl + c来完全停止git守护进程。

The only way that I've actually gotten it to work was calling the daemon from inside the repo, but that would entail having to do that for every repo (i intend to establish this for hundreds of repos) 我实际使用它的唯一方法是从存储库内部调用守护程序,但这将需要为每个存储库执行该操作(我打算为数百个存储库建立此守护程序)

I understand that I should dedicate a couple of weeks to thoroughly understanding Git, something that I've postponed for the past 6 months, since I've been able to get by with basic clones, adds and commits. 我知道我应该花几周的时间来全面了解Git,这是我过去六个月以来一直推迟的工作,因为我已经能够使用基本的克隆,添加和提交。

Having said that, i think there should be more visually constructive guides when attempting to explain the git workflow metaphor. 话虽如此,我认为在尝试解释git工作流隐喻时应该有更多直观的指导性说明。

Thank you for your time. 感谢您的时间。

It seems that it is related to bug #101 (issue 457 on google code) in msysgit and a fix was introduced in Git-1.9.4-preview20140611 . 看来这与msysgit中的错误#101 (Google代码中的问题457)有关,并且在Git-1.9.4-preview20140611中引入了修复程序。

Setting the sendpack.sideband config option and than push again works. 设置sendpack.sideband config选项,然后再次推送即可。

git config --global sendpack.sideband false
git push origin ...

I tried it with this git daemon command 我用这个git daemon命令尝试了

git daemon --base-path=. --export-all --reuseaddr --informative-errors \
    --verbose --enable=receive-pack

I tried my best and looked for the causes/solution of the error: 我已尽力寻找错误的原因/解决方案:

fatal: read error: Invalid argument

Perhaps this link would be of any help: Git remote server Push fails . 也许该链接会有所帮助: Git远程服务器Push失败 It seems related. 似乎有关。

Goodluck! 祝好运! I hope it helps you 希望对您有帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM