Git扩展 - 无法在Windows上的网络驱动器上推送git裸存储库 [英] Git Extensions - Can't push to git bare repository in a network drive on Windows

查看:909
本文介绍了Git扩展 - 无法在Windows上的网络驱动器上推送git裸存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm learning git on Windows, I have installed Git Extensions (Version 2.47.3) and played a bit with it. I've created a bare repository in my C: unit (as a central repository) and a personal repository anywhere else in my hard disk.

这两个硬盘在我的硬盘上没有任何问题。

I commit, push and pull with no problems with this two repos in my hard disk.

现在我创建了一个新的裸机中央存储库,它不在我的硬盘中,而是在网络驱动器中,说:// myShare / centralRepo /和一个新的个人回购(本地硬盘)。
我在我的主分支上的个人存储库中第一次提交并创建了一个名为develop的新分支。然后我想推到我的中央仓库,这就出现了问题。

Now I have created a new bare central repository that is not in my hard disk but in a network drive, let's say: //myShare/centralRepo/ and a new personal repo(local hard disk). I've commit for the first time in my personal repository on my master branch and made a new branch called develop. Then I wanted to push to my central repo, and here comes the problem.

它开始这个过程,写对象直到73%(17/23)一段时间后,显示错误:

It starts the process, writing objects until 73% (17/23) where it hangs for a while, after that shows the error:

"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

我搜索了很多,并且已经在堆栈溢出中搜索,但没有找到线索。我尝试了不同的位置和文件夹,不同的网络驱动器,结果始终如此。我错过了什么?

I googled a lot and already searched in stack overflow but didn't find a clue. I tried different locations and folders, diferent network drives and the result is always the same. Am I missing something?

谢谢

Thanks

推荐答案

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

The problem was that I'm under a Novell Network, if I use the automatic mapped drives, the push fails.

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

This post gave me the clue: http://git.661346.n2.nabble.com/Problem-pushing-to-a-Novell-share-td7248875.html

问题似乎是,如果目录不存在,Novell Networks会抛出错误80文件存在,而实际上它应该是错误3找不到路径。这一切都发生在sha1_file.c中的create_tmpfile()函数中。

The problem seems to be that Novell Networks throws a Error 80 "File exists" if a directory does not exist, while it actually should be Error 3 "Path not found". It all happends in create_tmpfile() function in sha1_file.c

在这里再次讨论 Git推送失败到Windows共享

所以解决方法是使用映射驱动器的IP地址(作为远程回购),而不是使用其 UNC路径或分配的驱动器号。

So the workaround is to use the ip address of the mapped drive (as remote repo) instead of using its UNC path or the assigned drive letter.

这篇关于Git扩展 - 无法在Windows上的网络驱动器上推送git裸存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆