为什么“git push”会使用 MySysGit 1.7.4 无限期地挂在那里?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5520329/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:16:49  来源:igfitidea点击:

Why does a "git push" just hang there indefinitely using MySysGit 1.7.4?

git

提问by nonopolarity

I tried small experiments with Ruby and Rails, and would like to push and pull from the Mac to PC and vice verse.

我尝试了 Ruby 和 Rails 的小实验,并希望从 Mac 推拉到 PC,反之亦然。

So I installed what the Git's website's standard recommended Git on PC (MySysGit 1.7.4), and run

所以我在PC上安装了Git网站标准推荐的Git(MySysGit 1.7.4),然后运行

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

either on the Mac or PC (to start a Git server), and then, on the PC, I cloned and add a file, and commit, and then do a

在 Mac 或 PC 上(启动 Git 服务器),然后,在 PC 上,我克隆并添加一个文件,并提交,然后执行

git push git://192.168.1.31/ master

now it will print out the following and just hang there indefinitely:

现在它将打印出以下内容并无限期地挂在那里:

Counting objects: 5, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4)

I tried it on another PC, and it is the same thing. How can this be fixed?

我在另一台电脑上试过,结果是一样的。如何解决这个问题?

(I am using the command to run the server from question: 'receive-pack': service not enabled for './.git')

(我使用命令从问题运行服务器:'receive-pack': service not enabled for './.git'

回答by Adrian Cornish

They have just released a version that allows a config option to stop git hanging.

他们刚刚发布了一个允许配置选项来停止 git 挂起的版本。

Fix is for https://github.com/msysgit/git/issues/101in release https://github.com/msysgit/msysgit/releases/tag/Git-1.9.4-preview20140611

修复是https://github.com/msysgit/git/issues/101在发布https://github.com/msysgit/msysgit/releases/tag/Git-1.9.4-preview20140611

You can fix it by setting

您可以通过设置修复它

git config --global sendpack.sideband false

回答by sinelaw

Apparently due to a bug in msysgit, that prevents it from pushing to git-daemon.

显然是由于 msysgit 中的一个错误,导致它无法推送到 git-daemon。

http://code.google.com/p/msysgit/issues/detail?id=457

http://code.google.com/p/msysgit/issues/detail?id=457

I was stuck on this myself. You can either install cygwin git (worked for me) or use ssh-based repo (worked for me as well, but i installed the remote repo on linux and used gitolite)

我自己被困在这个问题上。您可以安装 cygwin git(对我有用)或使用基于 ssh 的存储库(也对我有用,但我在 linux 上安装了远程存储库并使用了 gitolite)