如何在 windows 上使用 linux 生成的密钥与乌龟 git?

How to use linux generated keys on windows with tortoise git?

我 git 在 Linux 主机上工作,在 .ssh 文件夹中有一组密钥。 id_rsa 和 id_rsa.pub

我想在我的 windows 8.1 虚拟机中使用来自 Linux 主机的相同密钥。 我需要如何/在哪里 copy/edit /按摩那些 Linux 键以便 Tortoise git 可以使用它们?

我只看到 puttygen 被宣传并描述为生成密钥的方式,但如果需要使用其他密钥怎么办?

任何帮助,不胜感激。

首先,您需要将 public/private ~/.ssh/id_rsa.pub/id_rsa 密钥复制到 %USERPROFILE\.ssh
请注意,复制 private 密钥并不是最佳做法:生成一对新密钥,并注册一个新的 public 密钥是最好的。

然后您需要配置 TortoiseGit 以查找 openssh 密钥,而不是 putty 密钥:see here 在 TortoiseGit -> 设置 -> 网络中。

由于 TortoiseGit 默认配置为使用 putty,OP berntd chose the other route ():

I imported the id_rsa key into puTTYgen under convert.
I then saved it in the .ppk format.
I then told Tortoisegit to use putty key by ticking the box in the clone window.
It worked!