git:'credential-wincred' 不是一个 git 命令。参见 'git --help'。

问题

在使用 macOS git push会出现如下报错:

git:'credential-wincred'不是一个 git 命令。参见 'git --help'。 总共 0 (差异 0),复用 0 (差异 0)

解决

git config --unset-all credential.helper
git config --global credential.helper osxkeychain

原因

当初 git 创建文件应该是使用了 windows 上面的凭据,如果在 macOS 上使用并不存在的凭据(命令),就会出现git:'credential-wincred'不是一个 git 命令等提示。

设置 git config 完毕之后,就会使用 macOS Keychain 存储凭据。

资料

全部评论

相关推荐

团子 行业运营 n*15.5
点赞 评论 收藏
转发
点赞 收藏 评论
分享
牛客网
牛客企业服务