user1980099
user1980099

Reputation: 643

How to move gitolite directory to another place

I install gitolite in home directory of git user in /home/git. Now I would like to move it to /git. I copy /home/git to /git and change the home directory in /etc/passwd to be /git. I also tried it by making a link from /home/git to /git.

After the changes, when I tried to git clone git@gitserver:test1 I got the error:

fatal: 'test1' does not appear to be a git repository
fatal: The remote end hung up unexpectedly

I think I can be in the same situation, if my disk is crushed and I need to recover everything from backup.

How I can make the /git work as /home/git work? What I'm missing?

Thanks.

Upvotes: 1

Views: 1112

Answers (2)

user1980099
user1980099

Reputation: 643

Thanks to everyone trying to help me.

The problem solved.

The gitserver worked on CentOS release 6.4 and it a special problem.

The solution: (run on the gitserver)

    su - 
    cd ~git
    chcon -t ssh_home_t .ssh/
    chcon -t ssh_home_t .ssh/authorized_keys

Thanks again to everyone.

Upvotes: 1

VonC
VonC

Reputation: 1329532

I would rather re-install gitolite properly, and then move the "repositories" folder from its old place to its new one.
Or declare its path in the .gitolite.rc file.

Upvotes: 0

Related Questions