threads / discuss / 32944

Can git restrict source files ?

Subject: Can git restrict source files ?

## tl;dr

3 messages between Feb 19, 2013 and Feb 19, 2013.

replies: 2people: 3as markdown or json

Juan Pablo· Feb 19, 2013, 16:06 UTC · lore
Hi, 
I have a question, can i control the access to specific files or folders ?? I need that some developers can't see some source files, thank you very much for your time
Enviado desde mi iPhone
Matthieu Moy· Feb 19, 2013, 16:17 UTC · re: Juan Pablo · lore

Re: Can git restrict source files ?

Juan Pablo <juanpablo8517@gmail.com> writes:
Show 5 quoted lines
> Hi, 
>
> I have a question, can i control the access to specific files or
> folders ?? I need that some developers can't see some source files,
> thank you very much for your time

No, you can't. You can use e.g. gitolite to set up access control for a branch, but Git needs access to the complete tree.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Ævar Arnfjörð Bjarmason· Feb 19, 2013, 17:55 UTC · re: Juan Pablo · lore

Re: Can git restrict source files ?

On Tue, Feb 19, 2013 at 5:06 PM, Juan Pablo <juanpablo8517@gmail.com> wrote:
> I have a question, can i control the access to specific files or folders ?? I need that some developers can't see some source files, thank you very much for your time

No, but what you can do is to split these up into different repositories. E.g. where I work we have a puppet.git and a secrets.git, the latter contains passwords and other secret data, the former just uses macros to include that and is accessible to everyone.

← back to recent threads