开发者

git remote directory path rewrite

I have created a git user on my server, who's home directory is in /home/git. I've added my id_rsa.pub to the authorized_keys file so I don't have to authenticate using a password. My repositories live in /opt/git. So I can access my repositories with:

git@<hostname>:/opt/git/<reponame>

My problem is that I would like to be able to access my repositories like:

git@<hostname>:<reponame>

As a horribly hackish fix I created symlinks from all the repositories in /opt/git to /home/git. I don't want the开发者_StackOverflow社区 repositories to live in the git users home directory because other processes on the system running as different users need access to the repositories.

How can I configure my server to access /opt/git automatically when receiving changes?


You can set the git users home directory to /opt/git which would do the same thing as symlinking the git repos did.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜