简体   繁体   English

无法推送到Windows上的git裸存储库

[英]Can't push to git bare repository on windows

I am playing with GIT on windows. 我在Windows上玩GIT。 Installed msysgit (latest version) and seems everything look good. 安装了msysgit(最新版本),似乎一切都很好看。 I have created bare repository on my c:/repo folder which I had clone to c:/repoclone/ with following command: 我在我的c:/ repo文件夹上创建了裸存储库,我将其克隆到c:/ repoclone /并使用以下命令:

git clone git://localhost/repo

To enable git protocol I run another git-bash window with following command. 要启用git协议,我使用以下命令运行另一个git-bash窗口。

git daemon --export-all --enable=receive-pack

Cloned it correctly. 克隆它正确。 Basically I want c:/repoclone/repo will be my working directory and changes I want to push at my bare repository at c:/repo. 基本上我想要c:/ repoclone / repo将是我的工作目录和更改我想在c:/ repo的裸存储库中推送。 Pulling seems work fine for me but whenever trying to push data it seems keep processing without any kind of error. 拉动似乎对我来说很好,但每当试图推送数据时,似乎保持处理没有任何错误。

Once manually break daemon command I got following error. 一旦手动破坏守护进程命令,我得到了以下错误。

fatal: sha1 file '<stdout>' write error: Invalid argument
fatal: read error: Invalid argument
error: failed to push some refs to 'git://localhost/repo'

Any idea. 任何想法。

I am never able to find solution of above question and found that many people has same kind of issue but no proper solution. 我永远无法找到上述问题的解决方案,发现很多人都有同样的问题,但没有适当的解决方案。 I drop idea for GIT protocol instead start using git over HTTP. 我放弃了GIT协议的想法,而是开始在HTTP上使用git。 http://gitblit.com is really nice solution for work over HTTP. http://gitblit.com是通过HTTP工作的非常好的解决方案。

Hope this help. 希望这有帮助。

I had sam issue on TortoiseGIT every time when I was trying push to repository. 每当我尝试推送到存储库时,我就在TortoiseGIT上遇到了sam问题。
Finally I used --force option which solved my problem 最后我用--force选项解决了我的问题

I've seen this when there is no space left on the host of the bare repository. 当裸存储库的主机上没有剩余空间时,我已经看到了这一点。 Free up some space then try again. 释放一些空间然后再试一次。

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

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