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
As mentioned here, using the full path means bypassing gitosis completely. So your workaround isn't actually one, and that explains why push
fails.
- Try settings
loglevel
toDEBUG
to check if you see anything on the gitosis side. - Try resetting the
authorized_keys
file and see if that helps.
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
精彩评论