我正在使用Ubuntu 10.04.按照这里的教程,我创建了Heroku帐户,成功安装了GIT和Heroku.我已经上传了SSH密钥并将heroku添加到我的系统PATH中.
之后,我做了以下事情:
---------- FIRST(成功)-------------
$ cd PATH/TO/MY_APP
$ git init
Initialized empty Git repository in .git/
$ touch HELLO
$ git add .
$ git commit -m "Add a HELLO file"
Run Code Online (Sandbox Code Playgroud)
------------那么(成功)----------
$ 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
Run Code Online (Sandbox Code Playgroud)
-----------最后一次(哪次失败!!!)----------
$ 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'
Run Code Online (Sandbox Code Playgroud)
如上所述,我的最后一步失败了.
在我的最后一步(将我的应用程序推送到Heroku)时可能出现错误的原因是什么?为什么失败?
你不能把任何随机回购推送到Heroku.它必须是一个rails应用程序(或任何其他支持的应用程序,如Django,但在这种情况下OP正在处理Rails),这就是预收件钩子在你的情况下拒绝,因为你的repo只有一些虚拟文件.(请注意,本教程的第一步不是创建一个空的git repo,而是为您的Rails应用程序创建一个.请参阅快速入门中成功推送示例中的输出 - Rails app detected- 表示当您推送某些东西时它会查找rails应用程序. )
| 归档时间: |
|
| 查看次数: |
19786 次 |
| 最近记录: |