claude-code - 💡(How to fix) Fix [BUG] Git push via local proxy returns HTTP 403, forcing GitHub-MCP fallback with content drift

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error Messages/Logs

Fix Action

Fix / Workaround

Impact / workaround used:

Impact / workaround used:

RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Environment:

Claude Code on web Session-injected git remote: http://[email protected]:<port>/git/<owner>/<repo> Proxy upstream is api.anthropic.com (confirmed via Cloudflare headers + Domain=api.anthropic.com cookie in verbose curl trace) Symptom:

Every git push against the proxy-injected remote returns:

HTTP/1.1 403 Forbidden Request-Id: req_011CaxdSJqRA8hPpkwL24rAM git fetch / ls-remote / pull (read paths) all work fine. Only git-receive-pack is blocked. Retried with exponential backoff (2s/4s/8s/16s) — no transient recovery. Persisted across the full session.

Impact / workaround used:

The only available push path becomes mcp__github__push_files / create_or_update_file. That works but requires the model to embed full file contents inline in the tool-call parameter. For one 1255-line C# source file in this session, the JSON encoding pass collapsed \u2014 / \u2192 / \u2713 / \u2717 / \u26d4 escapes into their actual Unicode characters (the 8-hex \U0001F4B0 survived). The file still compiles — C# treats both forms identically — but the blob SHA diverges from the local file and the diff balloons cosmetically.

Total wall-clock cost for what should have been one git push: about 30 minutes of back-and-forth (multiple retry rounds, content reconstruction, integrity verification, sync gymnastics).

Expected:

git push works on a session where git pull works. The MCP fallback is a fine secondary path but it shouldn't be the only path for write operations.

Asks:

If the 403 is a deliberate write-block policy, please document it so I stop retrying and immediately route to MCP. If it's accidental — proxy mode mismatch, missing auth header on the push path — please fix. Consider making mcp__github__push_files accept a local-file-path reference instead of inline content, so write parity doesn't depend on model reproduction fidelity for large files.

What Should Happen?

Git push via proxy should work.

Error Messages/Logs

Steps to Reproduce

Environment:

Claude Code on web Session-injected git remote: http://[email protected]:<port>/git/<owner>/<repo> Proxy upstream is api.anthropic.com (confirmed via Cloudflare headers + Domain=api.anthropic.com cookie in verbose curl trace) Symptom:

Every git push against the proxy-injected remote returns:

HTTP/1.1 403 Forbidden Request-Id: req_011CaxdSJqRA8hPpkwL24rAM git fetch / ls-remote / pull (read paths) all work fine. Only git-receive-pack is blocked. Retried with exponential backoff (2s/4s/8s/16s) — no transient recovery. Persisted across the full session.

Impact / workaround used:

The only available push path becomes mcp__github__push_files / create_or_update_file. That works but requires the model to embed full file contents inline in the tool-call parameter. For one 1255-line C# source file in this session, the JSON encoding pass collapsed \u2014 / \u2192 / \u2713 / \u2717 / \u26d4 escapes into their actual Unicode characters (the 8-hex \U0001F4B0 survived). The file still compiles — C# treats both forms identically — but the blob SHA diverges from the local file and the diff balloons cosmetically.

Total wall-clock cost for what should have been one git push: about 30 minutes of back-and-forth (multiple retry rounds, content reconstruction, integrity verification, sync gymnastics).

Expected:

git push works on a session where git pull works. The MCP fallback is a fine secondary path but it shouldn't be the only path for write operations.

Asks:

If the 403 is a deliberate write-block policy, please document it so I stop retrying and immediately route to MCP. If it's accidental — proxy mode mismatch, missing auth header on the push path — please fix. Consider making mcp__github__push_files accept a local-file-path reference instead of inline content, so write parity doesn't depend on model reproduction fidelity for large files.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

claude-opus-4-7 (Opus 4.7, 1M context). Knowledge cutoff January 2026.

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Git push via local proxy returns HTTP 403, forcing GitHub-MCP fallback with content drift