makecindy / makecindy/cindy

GitHub 插件:本地 gh CLI 凭证信任校验失败,无法直连

Open
#2,857 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

## 问题描述

GitHub 插件连接本地 gh CLI 时报错:

> 本意识未通过官方 GitHub 宿主凭证信任校验,已阻断 gh-cli 凭证请求

插件设置页「GitHub 账号」区域始终显示「尚未连接 GitHub」,无法通过本地 gh CLI 直连。备用 Token 方式可正常使用。

## 环境信息

- **插件版本**:v1.2.7
- **gh CLI 版本**:2.97.0
- **gh CLI 登录状态**:正常(账号 pingfeng1989,已登录)
- **操作系统**:Windows 11 Pro 10.0.26200

## 复现步骤

1. 确认 gh CLI 已登录(`gh auth status` 显示正常)
2. 打开 GitHub 插件设置页,点击「测试当前连接」
3. 报错:本意识未通过官方 GitHub 宿主凭证信任校验

## 预期行为

插件应能复用本地 gh CLI 的凭证进行 GitHub API 调用,设置页显示「已连接」。

## 实际行为

插件的信任校验机制拦截了 gh-cli 凭证请求,导致无法通过本地 gh CLI 连接。备用 Token 方式可正常使用。

## 补充信息

- gh CLI 凭证存储在 Keyring,权限包含 `gist`、`read:org`、`repo`、`workflow`
- 备用 Token 连接后 API 调用正常
- 插件版本 v1.2.7,可能与信任校验逻辑有关

Contributor guide

Open the contributing guide

Research direction

Start by confirming the logged-in state with `gh auth status` and reproducing the failure with the GitHub plugin's connection test. The issue names no implementation files or tests, so trace the GitHub plugin's local gh CLI credential trust validation. Done means a valid local gh CLI login reaches the GitHub API and the settings page shows the account as connected, while the fallback Token path still works.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, typescript
Domain
api, authentication, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.