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

Aperta
#4,788 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
38/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
git, powershell, shell
Ambito
cli, security

Direzione di ricerca

Inizia riproducendo la session Windows CLI in un repository sull’unità D: ed esegui il comando git -C "D:<repo>" status --short --branch indicato. Confronta la directory di lavoro ereditata, le modifiche alle autorizzazioni della sandbox nella stessa sessione rispetto a quelle dopo il riavvio e l’accesso a %LOCALAPPDATA%\agency\logs. Il lavoro è completo quando la causa è stata identificata e i messaggi di negazione o il comportamento delle impostazioni rendono espliciti il percorso richiesto e lo stato del riavvio.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

triage
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

Lingua principale
Shell
Stelle
11.2k
Fork
1.9k
Merge medio
14h 16m
PR unite (30g)
6

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di github/copilot-cli

Tutte le issue di github/copilot-cli

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.