我正在尝试使用 ssh-agent 来允许使用带有密码的 ED25519 ssh 密钥进行无密码签名 git 提交。
但是,每次我从命令行提交时,系统都会要求我输入密码。我怀疑这是配置问题,因为 Visual Studio 运行正常,只是命令行或 VS Code 不行。
我使用的是标准的 Windows 环境,而不是 Git Bash 或 WSL。
- ssh-agent 设置为在启动时运行,并已验证
ssh-add -l
显示已添加正确的密钥- 我已设置
GIT_SSH
为 C:\Windows\System32\OpenSSH\ssh.exe
Git 配置明智
core.sshCommand = C:/Windows/System32/OpenSSH/ssh.exe
signingkey
设置为添加到的键ssh-agent
commit.gpgsign = true
gpg.format = ssh
操作系统 Windows 10 22H2 git 2.49.0.windows.1 终端 1.22.10731.0 Powershell 7.5.0