github / github/copilot-cli

Copilot Cloud Agent gets intermittent access denied errors

未关闭
#3,041 1 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看
area:authentication area:tools
主要语言
Shell
星标
11.2k
派生
1.9k
平均合并
14 小时 16 分钟
30 天内合并 PR
6

描述

### Describe the bug

We are using copilot coding agent mode for working on github issues and have instructed copilot to use the report_progress tool to push files to remote since github cli (git push command gets a 'The push failed due to access permissions') and github api (gets 'The GITHUB_TOKEN doesn't have write access via git push or the git API') both get an error.

Although the report_progress seems to work most of the times, it shows following intermittent issues:

Copilot report_progress tool gets access denied error "remote: Write access to repository not granted.fatal: unable to access 'https://github.com/...': The requested URL returned error: 403" randomly even though it has pushed successfully in the same session earlier, where it had got a "Progress reported successfully." result after invoking the tool.

We have also tried instructing copilot to use just the github_mcp_server/push_files tool, but that has below issues:
a. Despite clear instruction to not use the report_progress tool, copilot will still attempt to use it (and may succeed which causes another issue as below)
b. Later, it may use the github_mcp_server/push_files but that leads to git rebase errors as there seem to be two users it users that do the push via report_progress Vs github_mcp_server/push_files

Could you pl advise on how to avoid intermittent access denied errors

Thanks

### Affected version

Multiple versions of cloud agent

### Steps to reproduce the behavior

_No response_

### Expected behavior

Should not get access denied error and be able to push code successfully

### Additional context

_No response_

贡献指南

打开贡献指南

调研方向

首先比较 issue 中描述的 report_progress 和 github_mcp_server/push_files 路径,包括各自如何进行身份验证并推送更改。复现 cloud agent 工作流,并记录 403 或 rebase 错误何时发生;完成的标准是两种 push 方法的行为一致,且不会出现访问被拒绝或推送冲突失败。

由索引模型根据 Issue 内容生成。

评估

技术栈
git, github
领域
developer-experience, tooling
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
冷清
描述清晰度
需要澄清
新手友好度
42/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。