哪些文件权限受Git的core.sharedrepository设置影响? [英] Which file permissions are impacted by Git's core.sharedrepository setting?

查看:121
本文介绍了哪些文件权限受Git的core.sharedrepository设置影响?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

git中有一个名为core.sharedrepository的配置设置,据我所知,它会影响git处理文件权限的方式.

There is a config setting in git that is named core.sharedrepository and which to my understanding impacts the way that git deals with file permissions.

我的问题是文件是什么意思?

My question is what files are meant?

假设我的git回购位于/home/user/project

Assuming my git repo is at /home/user/project

  • /home/user/project/.git子文件夹中的文件?
  • 代码文件/home/user/project/,而不是.git?
  • 所有文件/home/user/project吗?
  • the files in the /home/user/project/.git subfolder?
  • the code files /home/user/project/ but not .git?
  • all files /home/user/project ?

我的问题的背景是/home/user/project/.git中的文件是在世界范围内可读的-rwxrwxr--中创建的.我希望所有文件只能由特定用户或至少一个groupid成员访问

the background to my question is that the files in /home/user/project/.git are created world readable -rwxrwxr--. I would like to have all files only accessible to either the specific user or at least a groupid member

推荐答案

该设置同时影响.git下的文件(存储库本身)和工作副本.拥有对一个而不是另一个的读取或写入权限不是很有用,因为大多数git操作都需要访问两者.

The setting affects both the files under .git (the repository itself) and the working copy. Having read or write permission to one but not the other would not be very useful, as most git operations require access to both.

如果.git中有世界可读的文件,请检查umask.可以吗?您可以通过使用touch创建文件并检查其权限来进行测试.

If you have world-readable files in .git, check your umask. Does it allow this? You can test this by creating a file with touch and check its permissions.

这篇关于哪些文件权限受Git的core.sharedrepository设置影响?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆