无法让 SSH 密钥在 sourcetree 和 github 之间工作 [英] unable to get SSH keys working between sourcetree and github
问题描述
我能够按照这些说明通过命令提示符成功创建一个密钥并连接到 github:
https://help.github.com/articles/generating-ssh-keys>
但是,当我尝试通过 Sourcetree 和 Putty 进行连接时,我无法连接.我试过了:
- 使用 putty 密钥生成器 (SSH-2 RSA) 生成新密钥
- 输入密码
- 保存私钥
- 保存公钥并添加 .pub 扩展名
- 将密钥从腻子密钥生成器窗口复制/粘贴到 github
- 尝试使用从 github 获得的 SSH 克隆 URL 从我的本地存储库中的私有 github 存储库中拉取分支来刷新分支
我还尝试打开从 github 命令行指令生成的密钥,它希望我将其转换为腻子类型的密钥,我这样做并保存了,尝试使用该密钥.也没有运气.
我做错了什么?
为了让它工作,我最终转到工具 -> 选项 -> SSH 客户端并将其更改为 OpenSSH.我生成并上传了几种不同类型的密钥,试图让它正常工作,但我认为这就是最终做到的.
I was able to create a key and connect to github following these instructions via the command prompt successfully:
https://help.github.com/articles/generating-ssh-keys
However, when I try to connect via Sourcetree and putty I cannot. I've tried:
- generating a new key with the putty key generator (SSH-2 RSA)
- entering a passphrase
- saving the private key
- saving the public key and adding a .pub extension
- copying/pasting the key from the putty key generator window into github
- attemping to refresh branches on a pull from my private github repository from my local repo using the SSH clone URL I got from github
I also tried opening the key generated from the github command line instructions and it wanted me to convert it to a putty-type key which I did and saved off, tried with that one. Also no luck.
What am I doing wrong?
In order to get it worked I ended up going to Tools -> Options -> SSH Client and changing it to OpenSSH. I generated and uploaded several different types of keys trying to get it work as well but I think this is what finally did it.
这篇关于无法让 SSH 密钥在 sourcetree 和 github 之间工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!