Git推动Heroku Master在尝试部署应用程序时会导致致命错误



我一直在尝试将我的第一个简单应用推向Heroku进行部署。但是,在确保安装正确的GEM文件(pg for Postgres),并在Heroku上具有适当的登录凭据并在Mac上安装Heroku时,每次尝试上传时,它都会给我以下消息。如何解决此问题,以便可以上传代码。

My-MacBook-Air:jrv JRV$ heroku login
Enter your Heroku credentials.
Email: ------k@gmail.com    
Password (typing will be hidden): 
Authentication successful.
My-MacBook-Air:jrv JRV$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

尝试 - verbose命令时,我会得到以下内容:

Joses-MacBook-Air:jrv JRV$ git push heroku master --verbose
Pushing to git@heroku.com:tranquil-beyond-7774.git
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

当我尝试Heroku键和键时:添加,我再次得到以下响应

my-MacBook-Air:jrv JRV$ heroku keys
=== kwikteck@gmail.com Keys
ssh-rsa AAAAB3NzaC...+Q2oPy1mCf kwikteck@gmail.com@github.com
ssh-rsa AAAAB3NzaC...PTa++gCorp kwikteck@gmail.com@github.com
my-MacBook-Air:jrv JRV$ heroku keys:add
Found existing public key: /Users/JRV/.ssh/github_rsa.pub
Uploading SSH public key /Users/JRV/.ssh/github_rsa.pub... done
my-MacBook-Air:jrv JRV$ git push heroku master
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
my-MacBook-Air:jrv JRV$ 

我目前正在运行Rails 4.0.0,Ruby 1.9.3p392(2013-02-22修订39386)[x86_64-darwin10.8.0]1.9.3

似乎您没有将正确的公共密钥发送到Heroku来验证您的身份。您可以尝试使用--verbose选项运行git push heroku master,然后查看真正发送的publicKey。

尝试

heroku keys:add

在您的应用程序目录中

使用此处的建议找到答案,我做了以下内容:

1)访问https://devcenter.heroku.com/articles/keys
2)使用Heroku键:添加命令以确保键上传并
3)没有结果,我使用$ ssh -add -d
删除了钥匙4)我使用$ ssh -keygen -t rya创建了一个新密钥;它将要求提供安全键的密码
5)使用$ HEROKU键添加回Heroku:添加
6)它将询问您希望使用哪个密钥集,我选择由系统制作的新密钥
7)接受后,我使用$ heroku键检查
8)然后我能够$ git推动heroku master -verbose

系统接受上传

最新更新