[BUG] "Claude Code cannot push to GitHub - 403 errors

Status Closed — not planned
Maintainer reply None cached
Activity 13 comments · opened Nov 6, 2025 · closed Feb 14, 2026

Preflight Checklist

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

What's Wrong?

Claude Code Git Push Issue - Support Request

Summary

Claude Code cannot push commits to GitHub, returning 403 errors despite following all documented requirements. This severely limits functionality and has resulted in ~$10 wasted credits attempting workarounds.

Environment

Problem Description

What Works:

  • ✅ git fetch from GitHub
  • ✅ git pull from GitHub
  • ✅ git commit locally
  • ✅ Reading repository files
  • ✅ WebSearch and other tools

What Fails:

  • ❌ git push to ANY branch
  • ❌ Error: "RPC failed; HTTP 403 curl 22 The requested URL returned error: 403"
  • ❌ Error: "send-pack: unexpected disconnect while reading sideband packet"

What We've Tried

1. Following Documentation (Branch Naming)

Per instructions: "CRITICAL: the branch should start with 'claude/' and end with matching session id"

Attempted:

# Extracted session ID from environment
CONTAINER_ID=container_011CUqZqZZH2oNhj3wzzu1g5...

# Created properly named branch
git checkout -b claude/signal-handling-011CUqZqZZH2oNhj3wzzu1g5

# Attempted push
git push -u origin claude/signal-handling-011CUqZqZZH2oNhj3wzzu1g5

Result: 403 error

2. Tried Different Branch Names

git push origin claude/continue-momentum-trad-011CUqZqY9h3fpa7e83Uv1pr  # 403
git push origin claude/signal-handling-work                              # 403
git push origin main                                                     # 403

All failed with 403

3. Checked Git Configuration

$ git config --list | grep -E "remote|url|user"
user.name=Claude
user.email=noreply@anthropic.com
remote.origin.url=http://local_proxy@127.0.0.1:55072/git/bagoltermann/momentum-trader

4. Verified Proxy Settings

$ env | grep PROXY
HTTP_PROXY=http://container_container_011CUqZqZZH2oNhj3wzzu1g5--claude_code_remote--petty-tender-tender-angles:noauth@21.0.0.173:15002
HTTPS_PROXY=http://container_container_011CUqZqZZH2oNhj3wzzu1g5--claude_code_remote--petty-tender-tender-angles:noauth@21.0.0.173:15002

Evidence

Commits Created But Not Pushed

$ git log --author="Claude" --format="%h|%cd|%s" --date=short
bca7330|2025-11-06|Fix signal handling: update existing signals and prevent duplicate positions
31e3a8f|2025-11-04|Add LLM development machine configuration guidance
caff4ab|2025-11-04|Document Schwab OAuth multi-machine token analysis

None of these commits exist on GitHub - all push attempts failed.

Successful Pushes from Other Claude Instance

VS Code's Claude successfully pushed 17+ commits on Nov 5-6:

$ git log origin/main --author="bagoltermann" --oneline --since="2025-11-05"
a1b4e08 Add slippage handling to Phase 2B1 plan
a1bfb85 Add End-of-Day (EOD) exit logic to Phase 2B1 plan
c74601b Add manual paper trading UI to dashboard
...etc

This proves the GitHub repository accepts pushes from Claude instances.

Impact

Severely Reduced Functionality:

  • Cannot commit and push code changes
  • User must manually copy/paste all code changes to VS Code
  • Defeats the purpose of using Claude Code
  • Wastes time and credits (~$10 so far)

Expected Workflow:

  1. Claude Code makes changes
  2. Claude Code commits
  3. Claude Code pushes to claude/* branch
  4. User pulls and merges in their local environment

Current Broken Workflow:

  1. Claude Code makes changes
  2. User manually copies changes to VS Code
  3. User commits and pushes manually
  4. Significant friction and credit waste

Questions for Support

  1. Is git push supposed to work in Claude Code?
  • If yes, what's causing the 403 errors?
  • If no, why does documentation mention push requirements?
  1. What's the correct branch naming pattern?
  • We've tried: claude/name-SESSION_ID
  • Is the session ID extraction correct?
  1. Is there a permission/proxy issue?
  • Why can we fetch/pull but not push?
  • Is the local_proxy blocking push operations?
  1. How can we debug this further?
  • Any logs we can check?
  • Any diagnostic commands to run?

Request

Please help us resolve this git push issue or clarify if Claude Code is not intended to push to GitHub. If pushing is not supported, the documentation should be updated to reflect this limitation.

Additional Context

Repository: https://github.com/bagoltermann/momentum-trader
Working on: Momentum trading application with paper trading features
Session started: Nov 6, 2025
User: bagoltermann

---
Filed by: User (via Claude Code session)
Date: November 6, 2025
Credits spent troubleshooting: ~$10 USD

What Should Happen?

Expected Workflow:

  1. Claude Code makes changes
  2. Claude Code commits
  3. Claude Code pushes to claude/* branch
  4. User pulls and merges in their local environment

Error Messages/Logs

## Impact

**Severely Reduced Functionality:**
- Cannot commit and push code changes
- User must manually copy/paste all code changes to VS Code
- Defeats the purpose of using Claude Code
- Wastes time and credits (~$10 so far)

**Expected Workflow:**
1. Claude Code makes changes
2. Claude Code commits
3. Claude Code pushes to claude/* branch
4. User pulls and merges in their local environment

**Current Broken Workflow:**
1. Claude Code makes changes
2. User manually copies changes to VS Code
3. User commits and pushes manually
4. Significant friction and credit waste

Steps to Reproduce

What We've Tried

1. Following Documentation (Branch Naming)

Per instructions: "CRITICAL: the branch should start with 'claude/' and end with matching session id"

Attempted:

# Extracted session ID from environment
CONTAINER_ID=container_011CUqZqZZH2oNhj3wzzu1g5...

# Created properly named branch
git checkout -b claude/signal-handling-011CUqZqZZH2oNhj3wzzu1g5

# Attempted push
git push -u origin claude/signal-handling-011CUqZqZZH2oNhj3wzzu1g5

Result: 403 error

Claude Model

None

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Claude Code Version**: 2.0.25

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

13 Comments

agraciag · 9 months ago

I am having the same issue, thanks for the detailed report.
Exit code 1
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
Everything up-to-date

minorcell · 9 months ago

This issue suggests troubleshooting in the following directions:

Is your token enabled with these permissions, because it seems that only read permissions succeeded, while write or operational permissions failed?

agraciag · 9 months ago

Yes the token was enabled and working fine in other repositories, the workaround was to start a new session with new branch and merge the failing branch.
Thank you!

agraciag · 9 months ago

This is what I am finding session after session:
"Bash
sleep 2 && git push -u origin claude/continue-previous-session-011CUzYhAgobRsojvkXQwwkx
Exit code 1
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
Everything up-to-date
[...]
I see the issue. The branch I'm on has a different session ID than my current session. Let me create a new branch with the correct session ID and push there:"

izakrobles · 9 months ago

I am also having this issue.

xtremexq · 9 months ago
I see the issue. The branch I'm on has a different session ID than my current session. Let me create a new branch with the correct session ID and push there:"

that's the exact issue. He can only push to the session ID it's created for this conversation, so it'll create a new branch for any file edits.

so basically you have to ask him to pull from MAIN or whatever branch you want and merge it to his new branch (he'll know what branch he gets), and then execute your task under the new branch.

agraciag · 9 months ago

Yes, that is working, sometimes it messes it again, but now, knowing the problem I just point it to the right branch or merge it myself.

quiztartufi · 9 months ago

i have the same problem, didn't find a workaround

aruslan · 8 months ago

The same problem here. Is Claude support aware of the issue?

Shinzuh · 8 months ago

Same

github-actions[bot] · 7 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] · 6 months ago

Closing for now — inactive for too long. Please open a new issue if this is still relevant.

github-actions[bot] · 6 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.