Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'm trying to setup Gitosis on CentOS 6.2 but have some doubts/problems about it. I read this docs here, here and here but it's unclear to me where to configure where repositories are created. My server has a partition /data where I create a directory and called /gitrepos. I want all the repos created under that directory. By default if I run the command:

gitosis-init < /home/reynierpm/reynierpm.pub

I get this

Initialized empty Git repository in /root/repositories/gitosis-admin.git/

Reinitialized existing Git repository in /root/repositories/gitosis-admin.git/

And I want this repos created under /data/gitrepos, any help?

Thanks in advance

share|improve this question

1 Answer 1

up vote 3 down vote accepted

The answer is the first sentence of the second link you have posted: "Gitosis stores repositories in the git user's home directory."

If you have followed the tutorial from the third link you've posted, you should have created user git on your system, and Gitosis should be creating new repositories in the home directory of this user as long as you run gitosis-init with the git user:

sudo -H -u git gitosis-init < /home/reynierpm/reynierpm.pub

Basically, the answer to your question is: Gitosis creates new repositories in $HOME/repositories.

share|improve this answer
    
Hi @vladimir-blaskov, there is no way to change this? –  ReynierPM Jun 26 '12 at 15:15
    
You can change to home directory of the git user and experiment a bit with the repositories configuration option as shown here. –  Vladimir Blaskov Jun 27 '12 at 7:35
    
Thanks @vladimir-blaskov, works like a charm! –  ReynierPM Jun 27 '12 at 13:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.