claude-code - 💡(How to fix) Fix [BUG] Git proxy returns 403 Forbidden on git-receive-pack [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#57829Fetched 2026-05-11 03:24:16
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

Error Message

$ git push origin main error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403 send-pack: unexpected disconnect while reading sideband packet fatal: the remote end hung up unexpectedly

$ curl -sI -X POST http://127.0.0.1:<port>/git/<owner>/<repo>/git-receive-pack HTTP/1.1 403 Forbidden Server: cloudflare Cf-Ray: 9f9974502d707e38-ORD Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Code Example

$ git push origin main
error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

$ curl -sI -X POST http://127.0.0.1:<port>/git/<owner>/<repo>/git-receive-pack
HTTP/1.1 403 Forbidden
Server: cloudflare
Cf-Ray: 9f9974502d707e38-ORD
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'
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?

In the Claude Code web sandbox, every git push to origin fails with HTTP 403 Forbidden from the local git proxy. Fetches work normally; only pushes are rejected. The 403 comes from Cloudflare (Server: cloudflare in response headers), suggesting a WAF rule blocking POST traffic to /git-receive-pack endpoints. Issue persists across retries with backoff. No way to push code changes from within the sandbox.

Server: cloudflare Cf-Ray: 9f9974502d707e38-ORD

What Should Happen?

git push from the Claude Code sandbox should successfully reach GitHub and update the remote branch. Currently, every push returns HTTP 403 from the local proxy, blocking all code transfer from sandbox to repo.

Error Messages/Logs

$ git push origin main
error: RPC failed; HTTP 403 curl 22 The requested URL returned error: 403
send-pack: unexpected disconnect while reading sideband packet
fatal: the remote end hung up unexpectedly

$ curl -sI -X POST http://127.0.0.1:<port>/git/<owner>/<repo>/git-receive-pack
HTTP/1.1 403 Forbidden
Server: cloudflare
Cf-Ray: 9f9974502d707e38-ORD
Content-Security-Policy: default-src 'none'; frame-ancestors 'none'

Steps to Reproduce

  1. Open a Claude Code web sandbox session attached to a GitHub repo via the local_proxy git remote
  2. Make any change to a tracked file
  3. git add, git commit, git push origin main
  4. Observe consistent 403 regardless of file size, repo, or session

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

4.7 [1M]

Platform

Anthropic API

Operating System

Other

Terminal/Shell

Other

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