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

无法清除git-credential-manager-core缓存,始终显示旧用户求助

解决Git Credential Manager Core缓存无法清除的问题

试试下面这些针对性的方案:

  • 检查并重置Git凭据助手配置
    先在Git Bash里执行git config --list --show-origin | grep credential.helper,确认当前使用的凭据助手是否为manager-core。如果配置异常,执行以下命令重置:

    git config --global --unset credential.helper
    git config --global credential.helper manager-core
    
  • 清理Git Credential Manager Core专属缓存目录
    这个工具在Windows下有独立的缓存存储,不在Windows凭据管理器里,直接删除以下目录的全部内容:

    • %LOCALAPPDATA%\GitCredentialManager
    • 若存在%USERPROFILE%\.git-credentials文件,也一并删除
  • 强制清除特定仓库或全局凭据
    在Git Bash里针对目标仓库执行清除命令,比如清除GitHub的凭据:

    git credential-manager-core erase https://github.com
    

    要全局清除所有缓存的话,执行:

    git credential-manager-core configure --unset credential.helper
    git credential-manager-core configure --set credential.helper manager-core
    
  • 检查系统级Git配置
    系统级配置可能会覆盖全局设置,执行git config --system --list | grep credential.helper查看,如果有相关配置,用以下命令删除:

    git config --system --unset credential.helper
    

    之后重新配置全局凭据助手。

  • 重启进程/系统
    结束所有Git相关的进程(Git Bash、Visual Studio、代码编辑器等),必要时重启电脑,确保缓存完全释放。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.08.22 11:36:15