Linux 是否为其他用户授予git update remote的权限?

Linux 是否为其他用户授予git update remote的权限?,linux,git,permissions,Linux,Git,Permissions,我在home/myuser目录上有git clone repo。我想授予另一个用户更新它的权限。该用户没有sudo权限 git repo位于以下目录中:/home/myuser/gitrepo/ 当其他用户转到该目录并尝试使用以下内容更新该目录时: /home/myuser/gitrepo/git远程更新 它将获得以下错误: 错误:无法打开。git/FETCH\u HEAD:权限被拒绝 我如何授予该用户仅更新该回购协议的权限?您可以尝试使用只有两个成员的组来保护您的回购协议:您和另一个用户。 见

我在home/myuser目录上有git clone repo。我想授予另一个用户更新它的权限。该用户没有sudo权限

git repo位于以下目录中:
/home/myuser/gitrepo/

当其他用户转到该目录并尝试使用以下内容更新该目录时:

/home/myuser/gitrepo/git远程更新

它将获得以下错误:
错误:无法打开。git/FETCH\u HEAD:权限被拒绝


我如何授予该用户仅更新该回购协议的权限?

您可以尝试使用只有两个成员的组来保护您的回购协议:您和另一个用户。
见“

最佳实践仍然是将授权委托给第三方框架,例如,基于ssh守护程序或http服务器的身份验证

chgrp -R <whatever group> gitrepo
chmod -R g+swX gitrepo
umask 002
git init --shared=group
# Or, for an existing repo
git config core.sharedRepository true