You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows端GitHub出现两个凭据条目,反复要求选择凭据

解决Windows端GitHub重复凭据弹窗问题
  • 先检查全局和本地Git的凭据配置,排查冲突项:

    git config --list --show-origin
    

    重点关注credential.helper相关配置,确保没有多个不同的助手设置。

  • 统一设置Git凭据助手为官方推荐的manager-core,覆盖所有冲突配置:

    git config --global credential.helper manager-core
    

    若单个本地仓库有独立凭据配置,进入对应仓库目录执行:

    git config --unset credential.helper
    
  • 彻底清理现有GitHub凭据:

    1. 打开Windows凭据管理器,删除所有github.com相关条目
    2. 打开命令行执行凭据清理命令:
      git credential-manager-core erase
      
      依次输入以下内容并回车:
      host=github.com
      protocol=https
      
      最后按Ctrl+D(或Ctrl+Z)结束输入。
  • 重新完成身份验证:
    执行一次Git操作(如git pull或git clone任意GitHub仓库)触发登录流程,选择**PAT(个人访问令牌)**方式登录,确保仅生成一个github.com凭据条目。

  • 排查第三方工具干扰:
    检查VS Code、GitHub Desktop等工具的Git设置,确保它们使用系统默认的Git凭据助手,而非单独存储凭据。

内容的提问来源于stack exchange,提问作者SaschaM78

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.04 12:52:04