github / github/copilot-cli

Windows sandbox:  git status  fails with working-directory permission denied despite allowed paths

Offen
#4,788 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

triage
Vorherrschende Sprache
Shell
Sterne
11.2k
Forks
1.9k
Ø Merge
14 Std. 16 Min.
Gemergte PRs (30 T.)
6

Beschreibung

Describe the bug

Copilot CLI continues to encounter filesystem access denials after I updated sandbox settings to allow access, including  C:\Users\vineset . The effective policy has not been verified, so this may be a sandbox policy-application or process working-directory issue.

Environment: Windows; Copilot CLI  1.0.81-1 .

Steps to reproduce:

  1. Open a CLI session in a Git repository on the D: drive.
  2. Configure sandbox read/write permissions to allow the required paths.
  3. Ask the agent to run  git -C "D:<repo>" status --short --branch .
  4. Update the sandbox permissions and retry in the same session.

Expected: Git reads the allowed repository and returns its status.

Actual: Every attempt fails with exit code 128:

fatal: Unable to read current working directory: Permission denied

Supporting observations:

  • PowerShell successfully listed the repository and confirmed that  .git  exists.
  • An earlier process-launch error reported  C:\  as its working directory, although the session was configured for the repository on D:.
  • Plugin management also failed to initialize logging because access to a file under  %LOCALAPPDATA%\agency\logs  was denied.
  • The Git error does not identify the blocked path, making it difficult to determine which permission is missing.

Impact: Unable to run even read-only Git status operations; repository updates and plugin management are also blocked.

Please investigate: Whether tool processes inherit the correct working directory, whether sandbox setting changes reach subsequent processes in the current session, and whether an additional restriction overrides the configured allowed paths. If a restart is required, please make that explicit in the settings UI. Denial messages should identify the affected path and policy rule.

Uncertainty: The exact root cause is not established, and reproduction after a full CLI restart has not been confirmed.

Affected version

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

Additional context

No response

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne damit, die Windows-CLI-Sitzung in einem Repository auf dem Laufwerk D: zu reproduzieren und den gemeldeten Befehl git -C "D:<repo>" status --short --branch auszuführen. Vergleiche das geerbte Arbeitsverzeichnis, Änderungen an den Sandbox-Berechtigungen innerhalb derselben Sitzung mit denen nach einem Neustart sowie den Zugriff auf %LOCALAPPDATA%\agency\logs. Erledigt bedeutet, dass die Ursache identifiziert ist und Ablehnungsmeldungen oder das Verhalten der Einstellungen den erforderlichen Pfad und den Neustartzustand explizit machen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, powershell, shell
Bereich
cli, security
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Aktiv
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
38/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.