Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在PowerShell中通过SSH进行git克隆,在W10上使用Yubikey_Git_Powershell_Ssh_Yubico - Fatal编程技术网

在PowerShell中通过SSH进行git克隆,在W10上使用Yubikey

在PowerShell中通过SSH进行git克隆,在W10上使用Yubikey,git,powershell,ssh,yubico,Git,Powershell,Ssh,Yubico,在新的Windows 10安装版本18362上,我想使用我的Yubikey Neo,它有一个身份验证子密钥以及一个加密和签名子密钥,通过SSH克隆Git repo: git clone git@bitbucket.org:boggin/something.git 我有一个gpg-agent.conf: 请注意,OpenSSH(现在是默认的SSH客户端)将无法工作,但您可以使用PuTTY。我已经尝试在我的.gitconfig中将ssh.variant设置为putty,但这似乎不起作用 要让Git

在新的Windows 10安装版本18362上,我想使用我的Yubikey Neo,它有一个身份验证子密钥以及一个加密和签名子密钥,通过SSH克隆Git repo:

git clone git@bitbucket.org:boggin/something.git
我有一个gpg-agent.conf:

请注意,OpenSSH(现在是默认的SSH客户端)将无法工作,但您可以使用PuTTY。我已经尝试在我的.gitconfig中将ssh.variant设置为putty,但这似乎不起作用


要让Git使用PuTTY SSH并识别Yubikey,我需要采取哪些步骤?

以下步骤对我的案例有效

在一本指南中,我发现:

git config --global core.sshcommand 'plink -agent'
如果您现在尝试克隆回购,控制台将挂起,但上面的链接指南显示了如何通过此操作:

putty.exe -ssh git@github.com

现在git克隆可以工作了。

一个小附录。如果您需要在.SSH中使用本地SSH密钥,那么最好注释掉sshcommand,打开一个新的PS会话,然后使用git。这将从使用Putty更改为OpenSSH。
putty.exe -ssh git@github.com