git-credential-proxy failing for push operations (403) since 2026-07-24

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 2 comments · opened Jul 26, 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?

Environment: Claude Code Remote (Cowork) session
Repo: 01015523142az-hash/Project
Branch: claude/billing-ak-subtab-weekly-8f3t2o
Symptoms:

  • git push via the session's git-credential-proxy (127.0.0.1:41729) →

403 Forbidden, body: "Permission to 01015523142az-hash/Project.git
denied to 01015523142az-hash"

  • GitHub API-based reads (get_me, list_branches, list_repos) → work fine,

authenticated as the same account, can_push: true reported

  • Direct push using the session's GH_TOKEN/GITHUB_TOKEN env vars as raw

git Basic-auth credentials (bypassing the proxy, hitting github.com
directly) → rejected outright: "Invalid username or token. Password
authentication is not supported for Git operations." (confirms these
are API-scoped tokens, not git-compatible PATs — expected, not the bug)
Last successful push: 2026-07-24
Repo state (via API): unchanged since then, no new commits landed
Conclusion: Not a GitHub account/permission/token issue — every
GitHub-side signal checks out. The git-credential-proxy service itself
appears to be using stale/wrong/insufficiently-scoped credentials when
forwarding push operations specifically (reads through it, and the
separate API-based GitHub integration, both work).

What Should Happen?

git push from a Claude Code Remote (Cowork / Claude Code on the web) session
should succeed when the account has write access to the repository. Instead,
it fails with an HTTP 403 from the session's internal git-credential-proxy,
even though the same session's GitHub API-based tools (get_me, list_branches,
list_repos) authenticate fine as the same account and report can_push: true.

Error Messages/Logs

Steps to Reproduce

  1. Start a Claude Code Remote (Cowork) session with a repo attached

(in this case github.com/01015523142az-hash/Project).

  1. Have Claude create a commit on a feature branch

(e.g. git commit on a new branch off main).

  1. Have Claude run git push -u origin <branch-name>.
  2. Observe: the push fails immediately with:

fatal: unable to access 'http://127.0.0.1:<port>/git/<owner>/<repo>/':
The requested URL returned error: 403

  1. Run with GIT_CURL_VERBOSE=1 to see the actual response body from the

proxy — it returns GitHub's own error text:
"Permission to <owner>/<repo>.git denied to <owner>"
(i.e. the account is denied push access to its own repo)

  1. Confirm this isn't a GitHub-side permission problem: the same session's

GitHub API-based tools (list_repos, get_me, list_branches) authenticate
successfully as the same account and report can_push: true for the repo.

  1. Confirm it isn't fixable with a git-side credential swap: attempting

git push directly to https://github.com/... using the session's
GH_TOKEN/GITHUB_TOKEN env vars as a Basic-auth credential (bypassing the
proxy) is rejected outright by GitHub with "Invalid username or token.
Password authentication is not supported for Git operations" — confirming
those tokens are scoped for the API only, not usable as git credentials,
and ruling out a stale-local-credential explanation.

Expected: step 3's push succeeds (or fails with a real GitHub permission
error if access is genuinely missing).
Actual: push is blocked by the git-credential-proxy itself with a 403,
while every other signal (API auth, can_push, repo state) says the
account has full write access.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

Claude Code version 2.1.220.

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

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