anthropics / anthropics/claude-code

[BUG] GitHub connector authorized but write operations fail with "403 Resource not accessible by integration

Aperta
#88,713 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:claude-code-web area:integrations area:mcp bug platform:windows
Lingua principale
Python
Stelle
145k
Fork
23.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

### Preflight Checklist

- [x] I have searched [existing issues](https://github.com/anthropics/claude-code/issues?q=is%3Aissue%20state%3Aopen%20label%3Abug) 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?

The Claude GitHub integration is connected (shows "Connected" in claude.ai → Settings → Connectors, and "Claude" app authorized under github.com/settings/applications), but every write operation fails identically:

create_or_update_file on an existing repo → 403 Resource not accessible by integration
create_repository (brand new repo) → same 403 Resource not accessible by integration

This is account-wide, not repo-specific — confirmed by testing against a brand-new repo, not just the one I was trying to push to. Read operations (get_file_contents, get_me) work fine.

Already tried: disconnecting/reconnecting the GitHub connector in claude.ai, and fully revoking + re-authorizing "Claude" directly on GitHub's authorized-apps page. No change, no scope/consent screen appeared during re-auth.

### What Should Happen?

Claude" GitHub integration isn't currently requesting/receiving write (repo) scope.

### Error Messages/Logs

```shell

```

### Steps to Reproduce

Connect GitHub in claude.ai → Settings → Connectors (shows as "Connected").
In a Claude Code session, create a new local commit and attempt to push it to a repo owned by the authenticated account (e.g. git push) → fails with 403 and GitHub's own message: Permission to /.git denied to .
Fall back to the GitHub MCP tool create_or_update_file on the same repo/branch → fails with 403 Resource not accessible by integration.
To rule out a repo-specific issue, call create_repository to create a brand-new, unrelated repo on the same account → fails identically with 403 Resource not accessible by integration.
Read operations on the same account work fine throughout (get_me, get_file_contents succeed) — only writes fail.
Attempt to fix via GitHub's UI: disconnect/reconnect the connector in claude.ai, then fully revoke access to "Claude" under github.com/settings/applications and re-authorize from scratch. No scope/permission consent screen is shown during re-authorization, and the same 403 persists afterward.

Expected: write operations (file creation/update, repo creation) succeed for the authenticated account once GitHub is connected.

### Claude Model

None

### Is this a regression?

Yes, this worked in a previous version

### Last Working Version

_No response_

### Claude Code Version

2.1.239

### Platform

Anthropic API

### Operating System

Windows

### Terminal/Shell

Windows Terminal

### Additional Information

_No response_

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the GitHub connector authorization flow in claude.ai and compare the permissions used by successful read operations with create_or_update_file and create_repository. Reproduce the 403 using a newly connected account and both write operations; done means file and repository writes succeed while get_me and get_file_contents continue to work.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, github
Ambito
api, authorization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Abbastanza chiara
Idoneità per principianti
45/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.