anthropics / anthropics/claude-code
[BUG] GitHub connector authorized but write operations fail with "403 Resource not accessible by integration
- 主要言語
- Python
- スター
- 145k
- フォーク
- 23.1k
- PR マージ指標
- PR 指標を取得中
説明
### 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_
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, github
- 領域
- api, authorization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 活発
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100