How to change gitosis default search path?

前端 未结 2 1634
隐瞒了意图╮
隐瞒了意图╮ 2020-12-06 22:45

I installed gitosis on my ubuntu desktop. But when I try \"git clone git@localhost:gitosis-admin.git\", it kept searching /home/git/, not /home/git/repositories. So I have t

相关标签:
2条回答
  • 2020-12-06 23:30

    Replay the part:

    cd gitosis
    sudo python setup.py install
    

    The setup.py install script is supposed to create the repositories directory.
    It takes the path from util.py:

    def getRepositoryDir(config):
        repositories = os.path.expanduser('~')
        try:
            path = config.get('gitosis', 'repositories')
        except (NoSectionError, NoOptionError):
            repositories = os.path.join(repositories, 'repositories')
        else:
            repositories = os.path.join(repositories, path)
        return repositories
    

    Note: considering the 'obsolete' status of the gitosis project, I mentioned in the comment Gitolite.
    The OP liuyanghejerry approved:

    You're right, I just installed gitolite in only few steps.
    Now I can use git clone gitolite:gitolite-admin.git

    0 讨论(0)
  • 2020-12-06 23:39

    Change the home path of the gitosis user, eg:

    sudo usermod --home /repos/gitosis --move-home
    

    This should change the gitosis repository search path.

    0 讨论(0)
提交回复
热议问题