当我在Windows上使用git over samba share时,当我想通过git_extentions或tortoiseGIT提交文件时,我会收到错误.错误是: 错误:无法写入sha1文件名.git/objects/b4/e819f886bf31b67c42249a0eff8e8b16cf7622:权限被拒绝.当我通过ubuntu服务器添加文件并提交文件时,它工作正常.我也在班里工作.
我已经尝试过了chmod 777 the whole .git folder
.
我也见过这个.这是一个git缺陷,可能与它如何创建和修改文件有关.澄清问题:
# mount a samba share locally. $ mount -t cifs options //share/project /mnt/project # The share contains a git checkout. # Do some typical development. $ cd /mnt/project $ vi file ## ok $ git pull ## ok $ git status ## ok $ git add file ## error! error: unable to create temporary sha1 filename .git/objects/8b/tmp_obj_mYE1Xi: Permission denied ## But everything from the shell seems to work. $ ls -latr .git/objects/8b/ ## ok. empty dir. $ touch .git/objects/8b/tmp_obj_mYE1Xi ## ok. $ echo test123> .git/objects/8b/tmp_obj_mYE1Xi ## ok. $ cat .git/objects/8b/tmp_obj_mYE1Xi ## ok. test123 $ rm .git/objects/8b/tmp_obj_mYE1Xi ## ok.
在git版本1.5.6.5(最新的Debian软件包)中,当您尝试时会出现错误git-add
.如果安装git 1.7.3.2(最新版本),则可以添加该文件,但在尝试提交时会出现错误.