I'm trying to initialize a git repo and then serve it using the git daemon. Everything with GitPython.
Initializing the repo works:
temp_dir = '/tmp/something'
repo = git.Repo.init(temp_dir)
Starting the daemon as well:
gd = Git().daemon(temp_dir, enable='receive-pack', listen='127.0.0.1', port=GIT_DAEMON_PORT,as_process=True, export_all=True)
gd.proc.wait()
But I'm not able to access the repo:
git clone git://127.0.0.1:9418/something
Cloning into 'something'...
fatal: remote error: access denied or repository not exported: /something
I'm not sure if I have to initialize the repo as bare, or if I have to specify the base_path when starting the git daemon... tried it all. Does anybody have some pointers?
PS: I've seen a similar approach here: https://github.com/gitpython-developers/GitPython/blob/master/git/test/lib/helper.py