Heroku中的新手:将我的应用程序推送到Heroku时出错 [英] Newbie in Heroku: Error when push my app to Heroku

查看:124
本文介绍了Heroku中的新手:将我的应用程序推送到Heroku时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是Ubuntu 10.04。按照教程,我创建了Heroku帐户,并安装了 GIT Heroku 成功。我上传了SSH密钥,并将heroku添加到我的系统PATH中。



之后,我做了以下事情:

-------- - FIRST(成功)-------------

  $ cd PATH / TO / MY_APP 
$ git init
在.git / $ b $中初始化的空Git存储库$ b $ touch HELLO
$ git add。
$ git commit -m添加一个HELLO文件

--- --------- THEN(成功)----------

  $ heroku创建
输入您的Heroku证书。
电子邮件:joe@domain.com
密码:
上传ssh公钥/Users/joe/.ssh/id_rsa.pub
创建http:// high-sunrise-58 .heroku.com / | git@heroku.com:high-sunrise-58.git
Git remote heroku新增

----------- LAST(失败!!!)----------

  $ git push heroku master 

警告:将IP地址'xx.xx.xx.xx'的RSA主机密钥永久添加到已知主机列表中。
计数对象:3,完成。
写入对象:100%(3/3),226字节,完成。
总计3(delta 0),重用0(delta 0)
f
-----> Heroku接收推送

!由于无法识别的错误,Heroku推送被拒绝。
!如果问题仍然存在,我们已收到通知,请参阅http://support.heroku.com。


至git@heroku.com:high-sunrise-58.git
! [remote rejected] master - > master(pre-receive hook refused)
错误:未能推送一些文件到'git@heroku.com:high-sunrise-58.git'

正如您在上面看到的那样,我的最后一步失败

可能是什么可能的原因是我的LAST步骤中出现错误(当我的应用程序推向Heroku时)?为什么它失败?

解决方案

推动任何随机回购Heroku。它必须是一个Rails应用程序(或任何其他受支持的应用程序,如Django,但在这种情况下,OP正在使用Rails),这就是预接收钩拒绝你的情况,因为你的repo只是有一些虚拟文件。 (注意,本教程的第一步不是创建一个空的git仓库,而是为您的Rails应用程序创建一个仓库。请参阅快速入门中的成功推送示例中的输出 - 检测到的Rails应用程序 - 意味着当你推动某些东西时,它会查找rails应用程序。)


I am using Ubuntu 10.04. By following the tutorial here, I have created Heroku account, installed GIT and Heroku successfully. I have uploaded the SSH key and add heroku to my system PATH.

After that, I did the following thing:

---------- FIRST (successful)-------------

$ cd PATH/TO/MY_APP
$ git init
Initialized empty Git repository in .git/
$ touch HELLO
$ git add .
$ git commit -m "Add a HELLO file"

------------THEN (successful)----------

$ heroku create
Enter your Heroku credentials.
Email: joe@domain.com
Password: 
Uploading ssh public key /Users/joe/.ssh/id_rsa.pub
Created http://high-sunrise-58.heroku.com/ | git@heroku.com:high-sunrise-58.git
Git remote heroku added

----------- LAST (Which failed!!!)----------

$ git push heroku master

Warning: Permanently added the RSA host key for IP address 'xx.xx.xx.xx' to the list of known hosts.
Counting objects: 3, done.
Writing objects: 100% (3/3), 226 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
f
-----> Heroku receiving push

 !     Heroku push rejected due to an unrecognized error.
 !     We've been notified, see http://support.heroku.com if the problem persists.


To git@heroku.com:high-sunrise-58.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:high-sunrise-58.git'

As you see above, my LAST step failed.

What could be the possible reason for the error in my LAST step(when push my app to Heroku)?Why it is failed?

解决方案

You cannot push any random repo to Heroku. It has to be a rails app ( or any of the other supported apps like Django, but in this case OP is working on Rails) and that is what the pre-receive hook is rejecting in your case since your repo just has some dummy file. ( NOTE that the first step in the tutorial is not creating an empty git repo, but creating one for your Rails app. See the output in the successful push example in the quickstart - Rails app detected - means it looks for the rails app when you push something.)

这篇关于Heroku中的新手:将我的应用程序推送到Heroku时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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