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

Re: BUG REPORT: git clone of non-existent repository results in request for credentials

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 11, 2018, 14:00 UTC
Message-ID
<87y39z3ea8.fsf@evledraar.gmail.com>
In-Reply-To
<708E1759-B2E3-436C-9D54-214159655B1B@acm.org>
On Sun, Nov 11 2018, Federico Lucifredi wrote:
Show 12 quoted lines
> git clone of non-existent repository results in request for credentials
>
> REPRODUCING:
> sudo apt install git
> git clone https://github.com/xorbit/LiFePo4owered-Pi.git    #this repo does not exist
>
> Git will then prompt for username and password on Github.
>
> I can see a valid data-leak concern (one could probe for private repository names in a brute-force fashion), but then again the UX impact is appalling. Chances of someone typing an invalid repo name are pretty high, and this error message has nothing to do with the actual error.
>
> RESOLUTION:
> The error message should indicate that the repository name does not exist.

This is a legitimate thing to complain about, but it has nothing to do with git itself maintained on this mailing list, but the response codes of specific git hosting websites. E.g. here's two issues for fixing this on GitLab:

https://gitlab.com/gitlab-org/gitlab-ce/issues/50201 https://gitlab.com/gitlab-org/gitlab-ce/issues/50660

These hosting platforms are intentionally producing bad error messages to not leak information, as you note.

So I doubt it's something they'll ever change, the bug I have open with this on GitLab is to make this configurable for privately run instances.

Previous: Federico LucifrediNext: Federico Lucifredi
Message 2 of 3 in “BUG REPORT: git clone of non-existent repository results in request for credentials”
  1. Federico LucifrediNov 11, 2018
  2. Ævar Arnfjörð BjarmasonNov 11, 2018
  3. Federico LucifrediNov 11, 2018

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.