I’m attempting to run my own git server with gitweb as the web interface. I’m serving up a directory called ‘git/’ here: /Users/me/Sites/git, which is the document root for git.example.com
I’ve created a user on my mac named ‘git’, such that I can ssh git@git.example.com, and I am logged in ok.
Now, say I’m working as ‘me@example.com’ (the user), and I want to push to my remote @ git.example.com, I have to type in git remote add gitweb ssh://git@git.example.com/~/Sites/git/projectname.git
Is there any way I can remove the ~/Sites/git/ from the url? Ideally, I want to be able to type: git remote add gitweb ssh://git@git.example.com/projectname.git
GitWeb and ssh is for two different Git access mechanism:
httpd.confas an example. But it isn’t for cloning, only for browsing.git-http-backend(in my example, I callgitolite-shellbecause I want to benefit from the authorization layer which is Gitolite)The only case where ssh doesn’t need the full path to execute your clone/push/pull command is when it is using the ssh forced command mechanism in order to intercept your git command and call a custom script (which can transform your “
projectname.git” into a “~/Sites/git/projectname.git“).That is what Gitolite does, for instance.