Git Extensions - 无法推送到Windows上的网络驱动器中的裸存储库

时间:2013-12-17 15:16:38

标签: windows git git-push git-extensions

我在Windows上学习git,我已经安装了Git Extensions(版本2.47.3)并且玩了一下。我在我的C:单元(作为中央存储库)和我硬盘中其他任何地方的个人存储库中创建了一个裸存储库。

我在硬盘中提交,推送和拉动这两个回购没问题。

现在我创建了一个新的裸中央存储库,它不在我的硬盘中但在网络驱动器中,假设:// myShare / centralRepo /和一个新的个人存储库(本地硬盘)。 我第一次在我的主分支机构的个人存储库中提交并创建了一个名为develop的新分支。然后我想推送到我的核心仓库,问题出现了。

它启动进程,将对象写入73%(17/23),然后挂起一段时间,之后显示错误:

"C:\Program Files (x86)\Git\bin\git.exe" push --recurse-submodules=check --progress "//myShare/centralRepo/" refs/heads/master:refs/heads/master
Counting objects: 23, done.
Delta compression using up to 4 threads.
fatal: sha1 file '<stdout>' write error: Broken pipe
remote: error: unable to create temporary file: File exists[K
remote: fatal: failed to write object[K
error: failed to push some refs to '//myShare/centralRepo/'
Done

我google了很多,已经在堆栈溢出搜索但没有找到线索。我尝试了不同的位置和文件夹,不同的网络驱动器,结果总是一样的。我错过了什么吗?

由于

1 个答案:

答案 0 :(得分:1)

问题是我在Novell网络下,如果我使用自动映射驱动器,则推送失败。

这篇帖子给了我线索:http://git.661346.n2.nabble.com/Problem-pushing-to-a-Novell-share-td7248875.html

问题似乎是,如果目录不存在,Novell Networks会抛出错误80“文件存在”,而实际应该是错误3“未找到路径”。这一切都发生在sha1_file.c

中的create_tmpfile()函数中

这里又讨论了Git push fail to a Windows share

因此,解决方法是使用映射驱动器的IP地址(作为远程仓库),而不是使用其UNC path或指定的驱动器号。