anthropics / anthropics/claude-code

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

Abierto
#88,713 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:claude-code-web area:integrations area:mcp bug platform:windows
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

### 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_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
git, github
Área
api, authorization
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.