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

Re: Unable to get "pretty" URL aliases working

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 11, 2010, 07:59 UTC
Message-ID
<7v7hrpvzqa.fsf@alter.siamese.dyndns.org>
In-Reply-To
<4B4ABDB5.9000203@uq.edu.au>
Adam Nielsen <adam.nielsen@uq.edu.au> writes:
Show 5 quoted lines
> I'm attemping to learn Git but I've gotten stuck trying to configure a
> server to host my repositories.
> ...
> [url "ssh://myserver/path/to/repos/"]
>   insteadOf myserver:

url.*.insteadOf is a configuration done on the _client_, i.e. the one that you run "git clone", "git fetch", "git push", etc. on.

	$ cat >>$HOME/.gitconfig <<\EOF
        [url "ssh://myserver/path/to/repos/"]
        	insteadOf = myserver://
	EOF
        $ git clone myserver://project.git

In any case, "attempting to learn Git" doesn't mix well with use of "insteadOf" to me. If you know /path/to/repos/project.git is what you want to access, any "attempting to learn Git" person would do more straight-forward "git clone ssh://myserver/path/to/repos/project.git", or "git clone myserver:/path/to/repos/project.git" which is even better (it is shorter to type and is a more natural form to spell ssh transport).

;-)
Previous: Johannes SixtNext: Adam Nielsen
Message 3 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.