我们使用 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 [email protected] /cdn-cgi/l/email-protection:/path/to/directory ~/git
以下是我们创建存储库、在本地使用它们,然后尝试推送回服务器的方式:
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/'
奇怪的是,对存储库的小编辑似乎成功推送,但包含多个新文件或大量编辑的较大提交不起作用。
我们是 sshfs 和 MacFuse 新手,但也是中级 git 用户。
有什么想法或建议吗?
Git 可以本地通过 SSH 进行推送,而无需将服务器安装到本地文件系统。
我建议尝试这个:
git push [email protected] /cdn-cgi/l/email-protection:/path/to/directory master
我这有效,只需将您的原始遥控器更改为[email protected] /cdn-cgi/l/email-protection:/path/to/directory
代替~/git
如果它不起作用,它至少会告诉我们 MacFuse 或 sshfs 不应该受到指责。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)