Why I can't add new repositories using gitosis?

拜拜、爱过 提交于 2019-12-03 08:29:38
Atherion

I was having this problem and I found out if I change the way I access the repository, it worked. After you have created the group writeable.

# Go to the directory you want to start your project in.
git init; git add .
git commit -m 'initial commit'
git remote add origin gitosis@[server]:gitosis-test.git
git push --all

So to recap before I was doing gitosis@[server]/gitosis-test.git and that was failing. I swapped the semicolon and it worked.

Props on the loglevel = DEBUG It helped a lot to find out what was happening.

UPDATE:
In your gitosis-admin repo, try adding loglevel = DEBUG under [gitosis] in your gitosis.conf. Push this change to your server and then try again. This will generate a lot of useful information to help debug the problem.

These instructions from Dreamhost are the best I found.

Are you pushing the gitosis-admin repo after updating permissions?

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..

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!