Unable to get "pretty" URL aliases working
- From
Adam Nielsen <adam.nielsen@uq.edu.au>
- Date
- Jan 11, 2010, 05:57 UTC
- Message-ID
- <4B4ABDB5.9000203@uq.edu.au>
Hi all,
I'm attemping to learn Git but I've gotten stuck trying to configure a server to host my repositories.
I would like to be able to do this:
git clone ssh://myserver/project.git git push
And have it work, but I keep getting errors about "/project.git" not existing in the root directory of my server. (Which is correct, they are stored elsewhere.)
The only documentation I could find about mapping a deep path to a "pretty" URL like this was in git-push(1) which stated I should add something like the following to a "config file". I'm guessing it means /etc/gitconfig on the server.
[url "ssh://myserver/path/to/repos/"] insteadOf myserver:
I'm a bit confused about where the colon comes into it, if I use that on the command line I get errors about resolving domain names. I've tried many variations of the insteadOf line ("ssh://myserver/", "myserver:/", "myserver/" etc.) but none of them make any difference. I don't even know if this file is being used.
Any pointers about how this URL mapping can be set up?
Many thanks, Adam.
(Please CC)