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

Error when cloning with weird local directory

From
Chris Packham <judge.packham@gmail.com>
Date
Aug 6, 2015, 04:21 UTC
Message-ID
<CAFOYHZByteuPZwRvw9tzFWOD6vguw4wPK1J6rLZZvHzyZRBtSA@mail.gmail.com>
Hi All,

A developer at $dayjob called me over to have a look at a git error he was getting (names changed to protect the innocent).

  $ git --version
  git version 2.5.0
  $ git clone ssh://example.com/repo.git
  Cloning into 'repo'...
  fatal: I don't handle protocol '/home/user/src/ssh'

After a bit of head scratching we found that he had a local directory structure called 'ssh://example.com/repo.git' it wasn't a complete repo but it had some of the things one expects to find in a .git directory (info, objects, refs, etc). It had been there for a while and we suspect was created by a scp gone wrong from the last time he was dealing with repo.git.

I'm wondering if it's worth catching this kind of weirdness and erroring out with a slightly more useful message. I'm also wondering what would have happened if this repo was actually a full and complete thing.

I'm not sure that there is a problem worth solving here. I can provide an anonymized tarball of the directory structure in question if anyone is interested. But maybe this is useful for future mailing list searchers[1].

Thanks, Chris -- [1] - https://xkcd.com/979/

Next: Torsten Bögershausen
Message 1 of 6 in “Error when cloning with weird local directory”
  1. Chris PackhamAug 6, 2015
  2. Torsten BögershausenAug 6, 2015
  3. Junio C HamanoAug 6, 2015
  4. Junio C HamanoAug 6, 2015
  5. Torsten BögershausenAug 8, 2015
  6. Junio C HamanoAug 10, 2015

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.