git 凭证助手不工作

git credential helper not working

我正在尝试保存我的 git 密码以避免每次都输入。

我在 windows 10 上使用 git bash。

git 每次我按下遥控器时都继续要求输入密码。

(git bash 为什么它不起作用?)

我试过:

git config --global credential.helper 'cache --timeout 28800'

并且:

git config --global credential.helper store

和:

git config --global credential.helper wincred

我在 git bash 和 cmd 中都试过了,所以我想这不是 git bash 引起的问题。

首先,对于 Windows,要使用的凭据助手是 manager:

git config --global credential.helper manager

其次,这仅适用于 HTTPS 网址,不适用于 SSH 网址 (user@server.com)

对于 SSH,它是:

  • 要求输入密码,因为您的 SSH 私钥受密码保护。
    如果是这种情况,请检查 ssh-agent:请参阅“Adding your SSH key to the ssh-agent
  • 要求提供 matt 的密码,因为它在远程服务器 art ~matt/.ssh/authorized_keys.
  • 上找不到您的 public 密钥