I have been trying to figure this one out but I am having a hard time doing so. I am currently working on an open source project that requires me to allow a user to
I know this is an old question, but I stumbled upon this while googling for something else.
The best way I've found to be able to push to a remote server and have it create a repository if it doesn't exists is to use gitolite. Look at the install guides for it, it's very easy to setup, and if you change some config settings you can have it use your exiting /var/repositories to store the repos.