【发布时间】:2011-01-27 17:40:31
【问题描述】:
我们正在使用 sshfs 通过 SSH 安装文件系统,并将其用作 git 存储库协作的远程存储。
Mac OSX 10.6.6 到 RHEL 3 服务器
SSHFS 2.2 版 (MacFUSE SSHFS 2.2.0)
MacFUSE 库版本:FUSE 2.7.3 / MacFUSE 2.0.3
sshfs -o workaround=rename gituser@gitserver.ourdomain.com:/path/to/directory ~/git
这是我们如何创建我们的 repo,在本地使用它们,然后尝试推送回服务器:
cd ~/git/mypersonaluser
git init --bare --share mynewrepo.git
git clone ~/git/mypersonaluser/mynewrepo.git ~/Desktop/mynewrepo
cd ~/Desktop/mynewrepo
... make a few edits to the repo ...
git push origin master
Counting objects: 7, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 20.82 KiB | 23 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
fatal: error when closing sha1 file: Bad file descriptor
error: unpack failed: unpack-objects abnormal exit
To /Users/joebob/git/mypersonaluser/mynewrepo.git/
! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to '/Users/joebob/git/mypersonaluser/mynewrepo.git/'
奇怪的是,对 repo 的小幅编辑似乎成功推送,但带有多个新文件或大量编辑的较大提交不起作用。
我们是 sshfs 和 MacFuse 新手,但是是中级 git 用户。
有什么想法或建议吗?
【问题讨论】:
-
我忘了说:我们的远程服务器上没有安装 git 二进制文件,这就是为什么我们需要挂载在 sshfs 上,以便我们可以在本地机器上使用工具。
-
你解决了吗?我在使用 macfusion 时遇到了同样的问题,也无法使用直接 git ssh 版本,因为服务器上没有 git 二进制文件。
-
还没有真正的解决方案。当我们从远程位置通过 VPN 连接时,问题似乎更加严重。通过千兆 LAN 连接时,这些问题似乎不太频繁出现。我们想知道如何设置我们的 VPN 是否也存在困难 + 可能还有一些延迟问题。我们的服务器上也存在一些内存问题,这可能只会加剧正在发生的事情。有时远程仓库分支被破坏,然后我们必须杀死分支并重新推送它并且它可以工作。我们很困惑。
-
我遇到了完全相同的问题。我发现的唯一“解决方案”是在目标机器上本地安装 git 并通过终端提示符运行它。