15
Microsoft Windows [Version 6.1.7600]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

E:\Windows\system32>heroku login
Enter your Heroku credentials.
Email: mymail@yahoo.com
Password (typing will be hidden):
Found existing public key: E:/Users/Stewie/.ssh/id_rsa.pub
Uploading SSH public key E:/Users/Stewie/.ssh/id_rsa.pub... failed
 !    Fingerprint already exists. Please use one SSH key per Heroku account

E:\Windows\system32>git clone git@heroku.com:sharp-winter-5732.git -o heroku
Cloning into 'sharp-winter-5732'...

 !  Your key with fingerprint f2:a2:f9:4a:c4:16:5b:f1:5a:21:cb:d8:c4:d2:18:ef is
 not authorized to access sharp-winter-5732.

fatal: The remote end hung up unexpectedly

E:\Windows\system32>

为什么我一直有这个错误?我应该怎么办?不要给我减分,因为我已经看过

https://help.github.com/articles/set-up-git

并给我

E:\Windows\system32>git config --global user.name "Stewie"

E:\Windows\system32>git config --global user.email "mymail@yahoo.com"

E:\Windows\system32>git config --global credential.helper cache
warning: credential.helper has multiple values
error: cannot overwrite multiple values with a single value
Use a regexp, --add or --replace-all to change credential.helper.

E:\Windows\system32>git config --global credential.helper 'cache --timeout=3600'


E:\Windows\system32>git clone git@heroku.com:sharp-winter-5732.git -o heroku
Cloning into 'sharp-winter-5732'...

!  Your key with fingerprint f2:a2:f9:4a:c4:16:5b:f1:5a:21:cb:d8:c4:d2:18:ef is
not authorized to access sharp-winter-5732.

fatal: The remote end hung up unexpectedly

E:\Windows\system32>

我也试过

GitHub:权限被拒绝(公钥)。致命:远端意外挂断

我不知道该怎么办 ....

4

2 回答 2

31

你的钥匙好像有问题。也许您需要将当前密钥上传到 he heroku

heroku keys:add

“管理您的 SSH 密钥”中的详细信息:https ://devcenter.heroku.com/articles/keys

于 2012-06-03T19:06:09.597 回答
2

部署 heroku 代码时权限被拒绝(公钥)。致命:远端意外挂断

在此链接中,我遇到了同样的问题,以下步骤对我有用:

    ->heroku login
       abc@gmail.com & password
    ->cd C:\Users\yourusername\.ssh
    ->ssh-keygen -t rsa -f id_rsa

如果它要求任何密码短语不要使用空白,填写密码短语但不要忘记它。

    ->heroku keys:add "id_rsa.pub"

将目录更改为工作区,然后

    ->git clone git@heroku.com:stark-dawn-1234.git -o heroku

使用您在上面设置的密码。

于 2012-06-03T19:12:57.413 回答