Powershell在每次拉动而不是在启动时都要求使用git RSA密码?

时间:2013-05-08 16:32:17

标签: git powershell posh-git

我已经安装了PoshGit并且我已经使用github和我的〜\ .ssh文件夹设置了我的RSA密钥,但PowerShell仍然提示我在每次拉/推时输入密码。我已按照所有说明given here。我的powershell配置文件如下所示:

$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
. 'C:\Users\Caleb\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
cd ~\Documents\GitHub\travefy

这是发生了什么。我怎么才能让它在启动时问我?

enter image description here

2 个答案:

答案 0 :(得分:5)

事实证明我需要运行

> ssh-add

我不确定为什么github.com上的任何文档都没有提到这一点。

答案 1 :(得分:5)

您可能需要通过在 Powershell 中发出以下命令来配置 Git 以使用 OpenSSH 的 Windows 10 实现:

git config --global core.sshCommand C:/Windows/System32/OpenSSH/ssh.exe

这对我有用。 资料来源:danieldogeanu