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

Resolved 💬 13 comments Opened Nov 6, 2025 by bagoltermann 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 ↗

This issue has 13 comments on GitHub. Read the full discussion on GitHub ↗