无法使用 git 扩展名加载我的私钥
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15584516/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Can't manage to load my private key with git extension
提问by sliders_alpha
I've been trying for the last 2 hours. I'm using xp-dev as a git repository provider (because I'm already paying and I have svn repo over there) I've given xp-dev my public key.
我一直在尝试过去 2 个小时。我使用 xp-dev 作为 git 存储库提供者(因为我已经在付款并且我在那里有 svn repo)我已经给了 xp-dev 我的公钥。
But when cloning my repo I a being rejected.
但是在克隆我的回购时,我被拒绝了。
"C:\Program Files (x86)\Git\bin\git.exe" clone -v --recurse-submodules --progress "ssh://xp-dev.com/repogit" "c:/ProjetPerso/repogit"
Cloning into 'c:/ProjetPerso/repogit'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Done
And from what I understood from various blogs, git extension should ask me to load my private key, except it doesn't.
从我从各种博客中了解到的,git 扩展应该要求我加载我的私钥,除非它没有。
I tried launching the putty authentification client (even though I choose openSSH) and loaded my private key inside, but it changes nothing.
我尝试启动 putty 身份验证客户端(即使我选择了 openSSH)并在其中加载了我的私钥,但它没有任何改变。
Any ideas?
有任何想法吗?
Thanks.
谢谢。
采纳答案by KindDragon
GitExtension ask to load private key only if you use Putty. You should do it manually for OpenSSH like described for GitHub https://help.github.com/articles/generating-ssh-keys
仅当您使用 Putty 时,GitExtension 才会要求加载私钥。您应该像 GitHub https://help.github.com/articles/generating-ssh-keys 中描述的那样,为 OpenSSH 手动执行此操作
回答by Sovattha Sok
I had this issue because I generated a SSH key with ssh-keygen and tried to use it with GitExtensions which only understands OpenSSH keys.
我遇到这个问题是因为我用 ssh-keygen 生成了一个 SSH 密钥,并尝试将它与只理解 OpenSSH 密钥的 GitExtensions 一起使用。
What you have to do is, from GitExtensions:
你需要做的是,从 GitExtensions:
- Tools > Putty > Generate or import key (A new window opens)
- Conversions > Import key
- Import your private key
- Save private key
- Type a file name like
mykey.ppk
- 工具 > 腻子 > 生成或导入密钥(打开一个新窗口)
- 转化 > 导入键
- 导入您的私钥
- 保存私钥
- 输入一个文件名,如
mykey.ppk
You should now able to use this new .ppk file in GitExtensions!
您现在应该可以在 GitExtensions 中使用这个新的 .ppk 文件了!
回答by Gayan Pathirage
回答by Pramod
I faced this issue now. I was able to get the solution via the following link from GitExtension itself.
我现在面临这个问题。我能够通过以下链接从 GitExtension 本身获得解决方案。
Same would also work of GitLab. You will need to add generated ppk file to GitHub or GitLab under settings page.
GitLab 也同样适用。您需要在设置页面下将生成的 ppk 文件添加到 GitHub 或 GitLab。