Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to set up a Git server in Ubuntu, but I can't get past this issue. I'm trying to add my public key to Gitosis thusly (as every tutorial so far has instructed me to do):

sudo -H -u git gitosis-init < /tmp/

But keep getting hit with the same error messages:

Reinitialized existing Git repository in /var/git/repositories/gitosis-admin.git/
Reinitialized existing Git repository in /var/git/repositories/gitosis-admin.git/     
Traceback (most recent call last):
      File "/usr/local/bin/gitosis-init", line 9, in <module>
        load_entry_point('gitosis==0.2', 'console_scripts', 'gitosis-init')()
      File "/usr/local/lib/python2.6/dist-packages/gitosis-0.2-py2.6.egg/gitosis/", line 24, in run
        return app.main()
      File "/usr/local/lib/python2.6/dist-packages/gitosis-0.2-py2.6.egg/gitosis/", line 38, in main
        self.handle_args(parser, cfg, options, args)
      File "/usr/local/lib/python2.6/dist-packages/gitosis-0.2-py2.6.egg/gitosis/", line 140, in handle_args
        run_hook.post_update(cfg=cfg, git_dir=admin_repository)
      File "/usr/local/lib/python2.6/dist-packages/gitosis-0.2-py2.6.egg/gitosis/", line 43, in post_update
      File "/usr/local/lib/python2.6/dist-packages/gitosis-0.2-py2.6.egg/gitosis/", line 79, in set_export_ok
        assert ext == '.git'

Even though the first two lines show the expected result, it doesn't seem to be working, as afterwards, if I try to clone the repository in my local machine, I get this:

fatal: 'gitosis-admin.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
share|improve this question
Fixed the issue by using Gitolite instead. – Paulo Coelho Alves Oct 28 '11 at 10:51

Old question, so just answering for the archives.

Check the names of directories in /var/git/repositories/; make sure that all the git repositories end with .git.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.