1

I have two git repositories in one single git instance and need one set of users to access one repository and another set of users to access second repository.

How can I create a group, and add users to it and provide them permissions to access the git repository.

2
  • 1
    I am trying to achieve this in windows machine using git bash Commented Jan 28, 2015 at 21:19
  • This sounds more like "2 projects within a single git instance" NOT really "2 git repositories inside single git instance" Commented Feb 1, 2015 at 13:25

2 Answers 2

0

Based on the updated info - two projects in one repository, in different directory trees:

Have two repositories. There should be little to no additional cost, certainly for a short term (<30 day) approach. Let git do what it is good for and works simply - repo's with users and don't try and smoosh them together. You'll waste time and effort you'd be better off spending on other stuff.

0

As an alternative to my other answer (two repositories), if groups is really what you want, you could use gitosis.

More at http://shapeshed.com/setting_up_git_for_multiple_developers/

It basically lets you have one shared key for the group of users to access the repo.

5
  • Let me explain my problem in detail. I have a single git instance on a server. I am adding two different projects into that git instance. I need only specific set of users to use one project and another specific set of users for another project. Commented Jan 29, 2015 at 14:42
  • I am new to GIT. So i need the SSH key option in detail how it could resolve the issue. If you could provide exact steps would be helpful. Commented Jan 29, 2015 at 14:44
  • I hope SSH option is applicable only to a single repository. Are there any other options available to provide access to two different projects inside a single git instance. I want some options without using any tools or framework. Commented Jan 29, 2015 at 19:45
  • ok, so projects in one repository, separated by different directories. For this just two two repositories. let me do another answer for this. Commented Feb 1, 2015 at 13:21
  • i have two different repositories inside a single git instance in different directories. I need to understand the exact steps for permissions both the repositories. Say for example, rep1-proj1 should have x users accessing it and rep2-proj2 should have y users accessing it. x users should not have access to rep2 and vice-versa. if you could please provide us with the exact steps to acheive this. Commented Jul 21, 2015 at 19:30

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.