`create_branch` returns a bare 404 when the token has no push access

オープン 初心者向け
#3,994 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@aloneangel45 がすでに取り組んでいます。

2026年12月1日 から。

  • #3995 @aloneangel45 による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github, go

調査の方向性

まず、create_branch ツールの実装と GitHub の git/refs リクエストに対するエラー処理を見つけ、issue で言及されている request_copilot_review とその copilotReviewErrMsg と比較してください。呼び出し元がプライベートリポジトリを読み取れるものの、push 権限がない場合のヒントを追加し、ほかの 404 の原因も引き続き理解しやすいことを確認してください。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

create_branch fails with 404 Not Found on a private repo I can read but can't push to. My agent took the 404 for a wrong repo or base branch and needed gh api repos/<owner>/<repo> --jq .permissions to find the cause. request_copilot_review explains this same 404 (copilotReviewErrMsg), so I think the write tools could do the same. Would you take a PR for create_branch, or would you rather have it in one place for all write tools?

Affected version

Remote server (https://api.githubcopilot.com/mcp/), 2026-12-01

Steps to reproduce the behavior
  1. Pick a private repo where permissions.push is false for your user
  2. Call create_branch with owner, repo and branch
Expected vs actual behavior

Actual: failed to create branch: POST https://api.github.com/repos/<owner>/<repo>/git/refs: 404 Not Found []

Expected: the same error plus a hint that you can read the repo but your credentials have no write access

主要言語
Go
スター
34.8k
フォーク
5.4k
平均マージ
2日 15時間
マージ済み PR(30日)
34

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/github-mcp-server のほかの issue

github/github-mcp-server の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。