Can't add exception for directory

I’m trying to set up GitHub Desktop to point to an existing repo on a network share.
It says “the repository is owned by another user on your machine”.
It offers that I can “add an exception for this directory” with a hyperlink, but clicking the hyperlink doesn’t do anything.

How do I add an exception?

I do exactly have the same issue here (OS: Windows 10). Also opening GitHub Desktop in Administrator mode does not help, as I am not even able to select a network as Local path (the network is not shown in the file tree, only my own hard drive).

The Git developers introduced this limitation as a default to prevent security issues. The article linked below describes the details and also mentions the config you need if you want to make exceptions for certain directories:

1 Like

The config mentioned is:
These config entries specify Git-tracked directories that are considered safe even if they are owned by someone other than the current user. By default, Git will refuse to even parse a Git config of a repository owned by someone else, let alone run its hooks, and this config setting allows users to specify exceptions, e.g. for intentionally shared repositories (see the --shared option in git-init[1]).

I’m not sure on Windows 11 where GitHub Desktop keeps its configuration files though.

The files should be exactly the same ones Git uses when you call it on the command line. The git config documentation describes relevant locations in the “Files” section.

However you don’t need to touch the files directly, you can use git config commands to set the variable like the description says. Note also that needs to be set in system or global (user) config.

Thanks. Actually the issue was solved with yesterday’s release from Github Desktop 2.9.15 (see this issue). Clicking on “add an exception for this directory” now works.

1 Like