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

Re: BUG: Wrong error message when access to .git directory denied

From
Junio C Hamano <gitster@pobox.com>
Date
May 29, 2015, 15:29 UTC
Message-ID
<xmqq1thzfll9.fsf@gitster.dls.corp.google.com>
In-Reply-To
<20150529104743.6220a11f@outerspace.dyndns.org>
Jonas Berlin <xkr47@outerspace.dyndns.org> writes:
> Severity: Low
> Impact: Confusion
;-)
Show 10 quoted lines
> Git version: 1.9.1
>
> If I don't have permissions to access the .git folder of a non-bare
> git repository, I get the following output:
>
>   fatal: Not a git repository (or any of the parent directories): .git
>
> Expected output:
>
>   fatal: Permission denied while accessing .git directory

But the thing is, .git being unreadable simply means we do not know if it is a .git directory, or a random directory that does not have anything to do with Git that happens to have that name.

So "Not a git repository" is the best Git can say.
Previous: Jonas BerlinNext: Stefan Beller
Message 2 of 4 in “BUG: Wrong error message when access to .git directory denied”
  1. Jonas BerlinMay 29, 2015
  2. Junio C HamanoMay 29, 2015
  3. Stefan BellerMay 29, 2015
  4. Junio C HamanoMay 29, 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.