【发布时间】:2019-02-24 16:15:00
【问题描述】:
我使用 WSL 运行 Windows 10。我在一台计算机上具有所需的行为,但无法在其他地方复制。这就是我所追求的:
- 第一次使用 ssh 密钥运行远程 git 命令时,git 提示我输入密码
- 随后没有提示,包括在新的终端窗口中(我使用 ConEmu)
- 关闭所有控制台窗口后,返回#1
我尝试过的事情:
- 使用
eval $(ssh-agent),后跟ssh-add;它会记住密码,但如果我把它放在我的~/.bash_profile中,它会提示我打开每个新的控制台窗口,并且我打开了很多 - 其中很多我没有使用 git。 - 将
git config --global credential.helper设置为cache或store - 一切here
- 使用
bash.exe和wsl.exe让git-credentials-manager.exe工作
这是我在~/.gitconfig 中输入的示例:
[credential]
helper = "/mnt/c/Program\\ Files/Git/mingw64/libexec/git-core/git-credential-manager.exe"
我已经从here 安装了git credential manager,并且还尝试了主要的 Git For Windows 安装作为替代方案。
如何鼓励它记住我的密码?
【问题讨论】:
标签: git windows-subsystem-for-linux ssh-agent