Atlassian/BitBucket Sourcetree SSH公钥被拒绝 [英] Atlassian / BitBucket Sourcetree SSH Public Key Denied

查看:205
本文介绍了Atlassian/BitBucket Sourcetree SSH公钥被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在 https://www.bitbucket.com 上的私有存储库中的项目上工作.

I'm working on a project in a private repository on https://www.bitbucket.com.

我正在对其进行本地编码,然后通过BitBucket/Atlassian的Windows Git客户端 Sourcetree .

I'm coding it locally, then staging, commiting and pushing the update via BitBucket's / Atlassian's Windows Git client, Sourcetree.

然后,我从需要SSH身份验证的远程共享服务器中提取文件.

After that, I'm pulling the files from a remote shared server, which requires SSH authentication.

为了将git repo与BitBucket帐户连接,我尝试了以下操作:

I've tried the following in order to connect the git repo with the BitBucket account:

  1. 启动了嵌入式Sourcetree SSH代理(Pageant)
  2. 使用我的密码将我的.ppk(PuTTY私钥)添加到Pageant中
  3. 在项目所在的位置打开SourceTree Terminal,我们将其称为C:/Project.
  4. 使用git init初始化存储库.
  5. 使用git push -u origin --all可以将存储库从我的计算机推送到BitBucket.
  6. 收到此错误:Permission denied (publickey).
  7. 试图查看我是否可以通过执行ssh -Tv git@bitbucket.org来获得更多详细输出-仍然是Permission denied.
  1. Launched the embedded Sourcetree SSH agent (Pageant)
  2. Added my .ppk (PuTTY Private Key) to Pageant using my passphrase
  3. Opened the SourceTree Terminal in the location of my project, let's call it C:/Project.
  4. Used git init to initialize the repository.
  5. Used git push -u origin --all in order to push the repo from my computer to BitBucket.
  6. Got this error: Permission denied (publickey).
  7. Tried to see if I can get some more verbose output by doing ssh -Tv git@bitbucket.org - Still, Permission denied.

我正试图弄清楚到底出了什么问题-Sourcetee根本找不到我的SSH密钥吗?密钥是否未装入某些特定位置,从而导致此现象?

I'm trying to figure out what exactly went wrong - did Sourcetee find my SSH key at all? Is the key not loaded in some specific place, causing this behavior?

注意:我已将公共密钥加载到BitBucket上的个人资料中.

Note: I have loaded the public key in my profile on BitBucket.

推荐答案

嗯-经过反复尝试,我找到了解决方案. 显然,使用PUTTY的密钥生成器并将新的公共密钥存储在我的.ssh文件夹中是行不通的. 但是,使用ssh-keygen IN GIT BASH ,然后尝试使用新生成的密钥对登录,效果很好. 出于好奇,尽管比什么都重要-我很想知道为什么会这样.

Well - I've found the solution after much trial and error. Apparently, using PUTTY's keygen and storing the new public key in my .ssh folder doesn't work. However, using ssh-keygen IN GIT BASH and then trying to login using the new generated key pair, works just fine. Out of curiosity though more than anything - I would love to know why this is the case.

这篇关于Atlassian/BitBucket Sourcetree SSH公钥被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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