我的情况是这样的: 公司的git服务器在另一台机器上,我使用的是一台开发机 git的大部分命令可用,少数几个不可用,例如 git pull,git rebase,git stash
检查了一下权限 strace -f -eexecve git pull 2>&1 | grep EACC 提示 [pid 26018] execve("/root/libexec/git-core/git-pull", ["git-pull"], [/ 22 vars /]) = -1 EACCES (Permission denied) 但是git-pull这个目录是在root下的,修改了这个目录的权限后,仍然不可访问 请问这种情况怎么解决好呢? 还是说压根儿就是我git的权限有问题? 先谢谢了
Then the next thing to try is probably (assuming you are running Linux): Well, kind of: it's CentOS, which I'm finding quite recalcitrant (e.g. I had to install strace). strace -f -e execve git pull
Though I suspect we may just see:
execve("/opt/libexec/git-core/git-core/git-pull", ...) = -1 EACCES (Permission denied)
which doesn't help much. I just want to be sure that is the source of the problem. No, the output is interesting. The permissions denied is from the erroneous /root install (see separate email):
[pid 3485] execve("/root/libexec/git-core/git-pull",
["git-pull"], [/ 18 vars /]) = -1 EACCES (Permission denied)
It looks in /opt/bin, but not /opt/libexec.
That looks like you are either running wrong git binary (one in /root/bin?) or the git installation is busted.
No, the git libexec directory SHOULD NOT be in PATH (git will add it there when needed).
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。