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

Re: [PATCH/RFC] Documentation: reorganize documentation of URLs understood by git

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Apr 6, 2010, 21:33 UTC
Message-ID
<20100406213341.GA8448@progeny.tock>
In-Reply-To
<7v6345jcfq.fsf@alter.siamese.dyndns.org>
Junio C Hamano wrote:
> I am of two minds.  It is frustrating if "git clone" (or "git fetch", or
> "git remote") page didn't list any examples an intelligent person (or at
> least one who thinks he is intelligent enough) to mimic and instead
> referred him with "look there" indirections.

Makes sense. So it should be self-contained for at least the common cases. Something like:

GIT URLS
	One of the following notations can be used to name the remote repository:
	·   git://host.xz[:port]/path/to/repo.git/
	·   git://host.xz[:port]/~user/path/to/repo.git/
	·   [user@]host.xz:~user/path/to/repo.git/
	·   [user@]host.xz:/path/to/repo.git/
	·   [user@]host.xz:path/to/repo.git/
	·   ssh://host.xz[:port]/path/to/repo.git/
	·   ssh://host.xz[:port]/~user/path/to/repo.git/
	·   /path/to/local/repo.git/
	·   path/to/local/repo.git/
	·   file:///path/to/repo.git/
	·   svn::http://host.xz[:port]/path/to/repo/
	Schemas supported include git, ssh, file, rsync, and if HTTP support
	is installed, http, https, ftp, and ftps.
	Git can be taught to support additional schemas by installing a
	'git-remote-<schema>' helper to your $PATH.  See git-remote-helpers(7)
	if you want to write one.
	The url.*.insteadOf and url.*.pushInsteadOf configuration items
	affect URLs supplied to this command.  This can be useful if
	there are a large number of similarly-named remote repositories
	and you want to use a different format for them.  See gitconfig(5)
	for details on setting this up.

Unfortunately, that leaves out any explanation of which transport you would want to use; in particular, it doesn’t say

 * Using local paths implies a request for "clone --local" unless the
   louder file:// syntax is used;
 * If you were thinking of using host.xz:port:/path/to/, use ssh://
   instead. [1]
 * The git protocol is very nice, but it does not support authentication.
   If that is a problem for you, use ssh instead for pushing.
   The rsync protocol support is bitrotting.
   http and ftp can be used as “smart” or “dumb” protocols; the former
   requires that the server administrator install a CGI script to serve
   requests efficiently; the latter is all some hosting services
   provide, and it has some caveats like requiring update-server-info.
Not sure where this should go.

Thanks for the food for thought, Jonathan

[1] Aside: Is there any reason for git and scp not to learn to support the two-colon syntax? I would think directories named 1087: are a rather rare beast, and they could still be accessed as "host.xz:./1087:/".

Previous: Ramkumar Ramachandra
Message 13 of 13 in “Write new giturl(7) manpage”
  1. Write new giturl(7) manpageRamkumar Ramachandra, Mar 29, 2010
  2. Daniel BarkalowMar 29, 2010
  3. Ilari LiusvaaraMar 29, 2010
  4. Sverre RabbelierMar 29, 2010
  5. Ramkumar RamachandraMar 29, 2010
  6. Jonathan NiederMar 29, 2010
  7. Sverre RabbelierMar 29, 2010
  8. Ramkumar RamachandraMar 29, 2010
  9. Ramkumar RamachandraMar 29, 2010
  10. Documentation: reorganize documentation of URLs understood by gitJonathan Nieder, Apr 6, 2010
  11. Junio C HamanoApr 6, 2010
  12. Ramkumar RamachandraApr 6, 2010
  13. Jonathan NiederApr 6, 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.