Copilot coding agent on Windows caches read‑only token after git fetch --unshallow, causing 403s on push #191238
Replies: 1 comment
-
|
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
🏷️ Discussion Type
Bug
💬 Feature/Topic Area
Copilot in GitHub
Body
Summary
When GitHub Copilot coding agent runs
git fetch --unshallowin a PR session on a Windows‑based environment before pushing any changes, the initial read‑only token is cached into Windows Credential Manager.After this happens, Copilot is unable to push commits or commit with
report_progressbecause Git continues using the cached read‑only credential, resulting in 403 Forbidden errors.Expected behavior
Copilot coding agent should be able to:
Credential caching should not cause token downgrades or permission mismatches during the agent lifecycle.
Actual behavior
@copilotrequests)git fetch --unshallowReproduction steps
git fetch --unshallowearly in the sessionEnvironment
GitHub version: latest
OS (runs-on): windows-latest
Token involved: initial read‑only token followed by write‑scoped token
Impact
Breaks Copilot coding agent workflows that require full git history
Causes non‑obvious failures unrelated to repo permissions
Requires manual mitigation (disabling credential helpers or clearing cached creds)
Workarounds
The agent should always call
report_progressat least once beforegit fetch --unshallowto ensure this issue does not happen during the session.When the 403 is encountered, the agent can run
cmdkey /delete:git:https://github.comto delete the bad WCM entry, allowing the nextreport_progressto successfully commit and push the changes. This also caches the write-capable token.Beta Was this translation helpful? Give feedback.
All reactions