【问题标题】:git: 'credential-wincred' is not a git command. See 'git --help'. on macgit: 'credential-wincred' 不是 git 命令。请参阅“git --help”。在 Mac 上
【发布时间】:2019-02-27 02:14:34
【问题描述】:

如何解决“MacBook pro”上的这个错误。

git: 'credential-wincred' 不是 git 命令。请参阅“git --help”。

git: 'credential-wincred' 不是 git 命令。请参阅“git --help”。

远程:HTTP 基本:访问被拒绝 致命:“https://gitlab01.xxxxx.com.tw/xxxxx/xxxxxxx.git/”的身份验证失败

我使用 "git config --system --unset credential.helper" & "git config --global credential.helper wincred “,对我没有任何作用。 谢谢。

【问题讨论】:

    标签: git gitlab


    【解决方案1】:

    问题是您正在尝试在 macOS 上使用 wincred 凭据帮助程序,它仅在 Windows 上可用。您提到您已经运行了git config --global credential.helper wincred,它将凭证助手设置为wincred。当 Git 尝试调用它时,它会失败,因为它不可用。

    相反,您应该运行 git config --unset-all credential.helpergit config --global credential.helper osxkeychain。这将导致您使用 macOS 钥匙串来存储凭据,这将在 macOS 上运行。

    【讨论】:

    • 在 Mac 机器上帮助我
    • 如果您有多个凭证助手则不起作用
    • 是的,在这种情况下,您需要手动编辑配置并删除wincred。真的没有办法解决这个问题。
    • 这仅适用于 Mac,不适用于 Linux
    • 是的,在 Linux 上,你会使用 libsecret 而不是 osxkeychain,但至少在 Debian 和 Ubuntu 上,你必须先自己编译。
    【解决方案2】:

    我在使用 WSL 和 ubuntu 的 Windows 上遇到了同样的问题,我必须执行 git config --global --unset-all credential.helper 来删除该值,而没有 --global 标记的 --unset-all 什么也没做。

    【讨论】:

      猜你喜欢
      • 2021-11-01
      • 2012-11-19
      • 2012-04-24
      • 2012-11-24
      • 2019-01-25
      • 1970-01-01
      • 2022-07-06
      • 2019-02-02
      • 2017-01-23
      相关资源
      最近更新 更多