得到错误! [远程拒绝]主人 - >主人(预先接收挂钩拒绝)

时间:2015-04-20 10:54:11

标签: ruby-on-rails git heroku

我再也无法git push heroku master

我收到以下错误(在捆绑安装和资产预编译步骤之后看起来没有问题)

错误如下:

remote: Verifying deploy............................
remote: 
remote: !   Push rejected to my-project.
remote: 
To https://git.heroku.com/my-project.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/my-project.git'

一个想法是什么导致这个?它是在heroku方面还是git方面? (我正在使用bitbucket)

由于

2 个答案:

答案 0 :(得分:0)

在部署到heroku时遇到了类似的问题。最可能的原因是源代码中存在错误。向上滚动生成的副本(从中复制了上述消息) 我找到了:"

remote:        rake aborted!
remote:        NameError: undefined local variable or method `heroRails' for main:Object"

因为输入错误。 纠正源代码提交和推送后。 ' git push heroku master'将成功运行和部署。

答案 1 :(得分:0)

正如错误消息所示(pre-receive hook declined),您要推送的服务器具有预接收挂钩,即在推送完成之前运行的脚本,以检查某些格式良好的属性。您的代码不满足这些。

搜索" heroku pre-receive hook"在SO或您最喜欢的搜索引擎上查找可能导致此问题的问题。

相关问题