Search code examples
pathrepositorygitosis

Gitosis on Ubuntu can only find repositories in the git->repositories symlink


I have gitosis on my Ubuntu box and suddenly, it can't find any repositories on the old path.

Yesterday this worked:

git clone [email protected]:myproject.git

Today, I get the reply:

fatal: 'myproject.git' does not appear to be a git repository

I have made no changes to my machine, and after some testing I found out that I could access the repository through the git symlink in ~gitosis user directory, so this still works:

git clone [email protected]:git/myproject.git

(the git symlinks points to "repositories" in the same dir)

I would very much like to avoid having to change the remote path in the config files of all my cloned projects. Can you help me how to configure git so I can access my repositories from the root path again?

Update: I found out that also I can't add new repositories any more. After adding a repo to gitosis.conf, setting the remote origin to include the git/ dir and pushing it with

git push origin master:refs/heads/master

I get

fatal: 'mynewproject.git' does not appear to be a git repository

So now I can only update existing repositories, and only if I change the remote path to include the git dir.

Best, Paul


Solution

  • The only thing that helped me was:

    • backup repositories with tar czf repos.tgz
    • backup gitosis.conf
    • reinstall gitosis with aptitude remove gitosis && aptitude install gitosis
    • move repositories back after gitosis-init with the old key
    • checkout gitosis-admin and move the old gitosis.conf into the dir, and push it back

    Now everything is running