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

Re: Relative url values in .gitmodules confusingly sensitive to clone via ssh vs https.

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Mar 20, 2020, 01:18 UTC
Message-ID
<20200320011809.GG366567@camp.crustytoothpaste.net>
In-Reply-To
<CAAjm7Gb8DdGUCfoPO+p2=YsmvFj5eoCn3jjEbwg3-hwRnt0Q9A@mail.gmail.com>
On 2020-03-18 at 16:02:18, Benjamin Shropshire wrote:
Show 18 quoted lines
> On Tue, Mar 17, 2020 at 5:26 PM brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> > Looking at the code, it appears that we don't let you go above the top
> > of the URL, which makes sense.  So we interpret it as a file system
> > path.
> >
> > (And since this SSH format is not technically a URL, we don't have a
> > root slash, which is probably why this is a problem.)
> >
> > Does it work if you write the following?
> >
> >   git clone git@github.com:/user/repo.git ./ssh
> 
> That seems to work... thought if the final resolution is telling
> people to just use a particular format for the repo address, I'd vote
> for telling them to use a full and proper ssh:// URL. (Technically I
> think `git@host:/...` may be a protocol relative URL? or maybe that
> would need to be `//git@host:/....`?)

I do intend to send a patch to make your particular use case work such that we consider a colon equivalent to a leading slash, but I have a little less time than usual (mostly due to current events). I hope to find some time this weekend, although of course anyone is welcome to send a patch sooner if they get to it first.

I agree that the URL form is probably better overall, but I suspect I'm in the minority there.

-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
Previous: Benjamin ShropshireNext: brian m. carlson
Message 4 of 7 in “Relative url values in .gitmodules confusingly sensitive to clone via ssh vs https.”
  1. Benjamin ShropshireMar 17, 2020
  2. brian m. carlsonMar 18, 2020
  3. Benjamin ShropshireMar 18, 2020
  4. brian m. carlsonMar 20, 2020
  5. brian m. carlsonMar 23, 2020
  6. Benjamin ShropshireMar 23, 2020
  7. brian m. carlsonMar 23, 2020

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.