Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git push“;写入错误:不支持操作";_Git_Samba_Git Bare - Fatal编程技术网

Git push“;写入错误:不支持操作";

Git push“;写入错误:不支持操作";,git,samba,git-bare,Git,Samba,Git Bare,我在samba共享服务器上有一个裸git repo,我的团队可以将其推送到该服务器上,但当我尝试推送时,会出现错误: remote: fatal: sha1 file './objects/pack/tmp_pack_<changes-with-every-push>' write error: Operation not supported error: unpack failed: index-pack abnormal exit To /run/user/1000/gvfs/s

我在samba共享服务器上有一个裸git repo,我的团队可以将其推送到该服务器上,但当我尝试推送时,会出现错误:

remote: fatal: sha1 file './objects/pack/tmp_pack_<changes-with-every-push>' write error: Operation not supported
error: unpack failed: index-pack abnormal exit
To /run/user/1000/gvfs/smb-share:server=<ip-address>,share=<share>/<directory>/<bare.git>
! [remote rejected] <my-branch> -> <my-remote-branch> (unpacker error)
远程:致命:sha1文件。/objects/pack/tmp\u pack\u写入错误:不支持操作
错误:解包失败:索引包异常退出
To/run/user/1000/gvfs/smb共享:服务器=,共享=//
! [远程拒绝]->(解包程序错误)
以下是我尝试过的内容列表:

  • 我将裸机repo从服务器复制到了我的机器上,并能够推送到那里(bare.git存储库就可以了)
  • 我在服务器上复制了一份裸repo(并作为第二个远程设备添加),但当我推到它时,会出现相同的错误消息(这与samba共享有关吗?)
  • 我将裸repo的另一个副本放到usb上,成功地推送到它,我的团队的一名成员能够将我的分支拉到他的本地repo,并从那里通过samba成功地推送到服务器(所以可能不是samba)
  • 然后,我从stable创建了一个新分支,并能够从那里推送一个文本文件(因此git将接受一个文本文件提交,但并非全部来自我的工作分支,但不能是我的提交,因为我的同事能够从他的机器推送我的分支)
  • 我已经使用prune和aggressive标志运行了gc,git fsck没有返回任何问题
  • 我已经重新安装了smbclient和git,但没有成功
“OperationNotSupported”错误使我认为服务器端存在一些系统调用问题,导致git返回错误


我以前没有找到过有这个问题的人。有什么想法吗?

所以我终于解决了这个问题

我通过Nautilus使用“连接到服务器”安装了服务器,该服务器安装为:

/run/user/1000/gvfs/smb-share:server=<ip-address>,share=<share>/<directory>/<bare.git>
/run/user/1000/gvfs/smb共享:服务器=,共享=//
我决定使用中提供的信息卸载服务器并将其装载到/mnt/mountpoint


它现在可以工作了,我可以把我的分支推到远程,但只有当我是sudo用户的时候。我还没来得及解决这个问题,但这是一个问题,等我有时间的时候再解决。希望有此问题的其他人认为我的答案有用。

您对包含远程服务器的目录子树有写权限吗?我以前可以推送,如上所述,我可以在新分支上推送单个文本文件,因此是的,我希望这意味着我有写权限。此外,当我导航到该目录时,我拥有完全的读、写和执行权限。