git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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)
Next: Johannes Sixt
Message 1 of 6 in “Unable to get "pretty" URL aliases working”
  1. Adam NielsenJan 11, 2010
  2. Johannes SixtJan 11, 2010
  3. Junio C HamanoJan 11, 2010
  4. Adam NielsenJan 11, 2010
  5. Junio C HamanoJan 13, 2010
  6. Adam NielsenJan 14, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.