无法让 SSH 密钥在 sourcetree 和 github 之间工作 [英] unable to get SSH keys working between sourcetree and github

查看:32
本文介绍了无法让 SSH 密钥在 sourcetree 和 github 之间工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我能够按照这些说明通过命令提示符成功创建一个密钥并连接到 github:

https://help.github.com/articles/generating-ssh-keys

但是,当我尝试通过 Sourcetree 和 Putty 进行连接时,我无法连接.我试过了:

  1. 使用 putty 密钥生成器 (SSH-2 RSA) 生成新密钥
  2. 输入密码
  3. 保存私钥
  4. 保存公钥并添加 .pub 扩展名
  5. 将密钥从腻子密钥生成器窗口复制/粘贴到 github
  6. 尝试使用从 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:

  1. generating a new key with the putty key generator (SSH-2 RSA)
  2. entering a passphrase
  3. saving the private key
  4. saving the public key and adding a .pub extension
  5. copying/pasting the key from the putty key generator window into github
  6. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆