访问Windows共享时,git错误“无法将某些引用推送到”

时间:2013-09-30 13:17:38

标签: git git-push cifs

当我尝试将我的repo推送到已安装的Windows共享时,我收到以下错误消息:

git push
Counting objects: 47, done.
Compressing objects: 100% (15/15), done.
Writing objects: 100% (25/25), 508.09 KiB | 88 KiB/s, done.
Total 25 (delta 18), reused 13 (delta 7)
fatal: error when closing sha1 file: Host is down
error: unpack failed: unpack-objects abnormal exit
To /dir/
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to /dir/

我尝试了很多我在其他帖子上找到的东西,但它们对我不起作用:

git gc
git repack
git config --add core.sharedRepository group

我还更改了文件权限:

-rwxrwxrwx 0 marc marc 156 Sep 30 14:51 config
-rwxrwxrwx 0 marc marc  73 Apr 20  2012 description
-rwxrwxrwx 0 marc marc  23 Apr 20  2012 HEAD
drwxrwxrwx 0 marc marc   0 Apr 20  2012 hooks
drwxrwxrwx 0 marc marc   0 Apr 20  2012 info
drwxrwxrwx 0 marc marc   0 Sep 24 16:26 objects
drwxrwxrwx 0 marc marc   0 Apr 20  2012 refs

并且驱动器上还留有足够的空间。

1 个答案:

答案 0 :(得分:1)

似乎这个错误是由git版本引起的,它是Ubuntu 12.4 LTS的标准apt存储库。从另一个repo安装更新的版本后,它可以正常工作

 sudo add-apt-repository ppa:git-core/ppa
 sudo apt-get update
 sudo apt-get upgrade