Why I can't add new repositories using gitosis?

前端 未结 3 653
夕颜
夕颜 2021-02-10 15:02

I set up gitosis but even when i can clone, pull and push to the gitosis-admin repo, i can\'t create new ones.

According to every doc i read, to create a new repo one ha

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-10 15:41

    Hello i've had exactly the same problem just today.

    I checked by

    $ ssh git@yourserver echo if you see this, it is not gitosis

    and found out that gitosis was not servicing ssh sessions.

    I couldnt get why.

    As a solution a deleted git user (that i used for gitosis purposes) with its home folder and recreated it from scratch.

    And it helped.

    README.rst from gitosis.git says

    ".. warning::

        For now, ``gitosis`` uses the ``HOME`` environment variable to
        locate where to write its files. If you use ``sudo -u``
        without ``-H``, ``sudo`` will leave the old value of ``HOME``
        in place, and this will cause trouble. There will be a
        workaround for that later on, but for now, always remember to
        use ``-H`` if you're sudoing to the account.
    

    You should always edit the configuration file via git. The file symlinked to ~/.gitosis.conf on the server will be overwritten when pushing changes to the gitosis-admin.git repository. " i suppose it might be the cause..

提交回复
热议问题