1

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

Yesterday this worked:

git clone git@mymachine.com: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 git@mymachine.com: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

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
user681814
  • 799
  • 1
  • 8
  • 19

2 Answers2

0

As mentioned here, using the full path means bypassing gitosis completely. So your workaround isn't actually one, and that explains why push fails.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks. It does seem like gitosis is not really working at all because the only way to update gitosis.conf is to use the git/ path when pushing, and loglevel=DEBUG does not give me any extra output. – user681814 Mar 29 '11 at 13:24
  • @user681814: I would rather install gitolite, with the from-client method: much more robust. http://stackoverflow.com/questions/5041067/gitolite-git-clone-error/5041898#5041898 – VonC Mar 29 '11 at 14:07
0

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

user681814
  • 799
  • 1
  • 8
  • 19