无法克隆git回购

无法克隆git回购

问题描述:

我正在尝试在heroku上托管的项目上进行合作。我已经通过meldium.com被邀请,并且我已经成功地将我的电子邮件地址注册到了项目中。

I am trying to collaborate on a project hosted on heroku. I have been invited via meldium.com and I have successfully registered my email adress to the project.

我收到了一封来自heroku的电子邮件,声称我可以用以下命令行:

I received an email from heroku saying that I could clone the repo with the following command line:

$ git clone git@heroku.com:test-repo.git -o heroku

但每次尝试克隆回购时,都会收到以下错误消息:

But everytime I try to clone the repo I get the following error message:

Warning: Permanently added the RSA host key for IP address 'XX.XX.XX.XXX' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

我不明白的是我收到一封电子邮件,说有一个密钥已经添加到我的账户,当我输入 heroku key 我得到这个:

What I don't understand is that I received an email saying that a key had been added to my account and when I type heroku key I get this:

ssh-rsa AAAAB3NzaC...lhJB2r8hnD my-github-id@github.com

我做错了什么?

非常感谢

Many thanks

错误消息,那么它通常会导致您所提供的ssh密钥与Heroku的密钥之间不匹配。

If you're getting a public key error message then it's typically down to a mismatch between what ssh key you are presenting and what key Heroku has.

从命令行执行 ssh - v git@heroku.com 你在这里看起来有点像

From your command line execute ssh -v git@heroku.com you're looking in here for a bit that looks like

debug1: Next authentication method: publickey
debug1: Offering RSA public key: /Users/foobah/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).

如果密钥的名称与您添加到Heroku的公钥不符,您需要将相应的密钥添加到Heroku中,或者切换ssh用于heroku.com域的密钥。

If the name of the key doesn't correspond to the public key you've added to Heroku then you'll need to either add the corresponding key to Heroku or switch the key that ssh uses for the heroku.com domain.