问题
I've got the following errors when I tried to push to staging on Heroku. I don't understand why.
$git push staging-heroku staging:master
Counting objects: 72, done.
Compressing objects: 100% (64/64), done.
Writing objects: 100% (72/72), 5.06 MiB | 837 KiB/s, done.
Total 72 (delta 27), reused 0 (delta 0)
-----> Fetching custom git buildpack... failed
! Push rejected, error fetching custom buildpack
To git@heroku.com:pure-reef-7664.git
! [remote rejected] staging -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:pure-reef-7664.git'
[ubuntu@ip-172-31-19-78:~/bitstarter]$git push staging-heroku staging:master
Counting objects: 72, done.
Compressing objects: 100% (64/64), done.
Writing objects: 100% (72/72), 5.06 MiB | 766 KiB/s, done.
Total 72 (delta 27), reused 0 (delta 0)
-----> Fetching custom git buildpack... failed
! Push rejected, error fetching custom buildpack
To git@heroku.com:pure-reef-7664.git
! [remote rejected] staging -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:pure-reef-7664.git'
回答1:
It appears that you've created your app with a "custom buildpack", either by invoking heroku create myapp --buildpack http://... or by setting the config var BUILDPACK_URL, and the URL you've provided is bad.
Make sure you have a valid URL and invoke heroku config:set BUILDPACK_URL=https://<valid url>
回答2:
If you are using a custom buildpack and it's worked before, this is unfortunately something that "just happens" sometimes with Heroku (see the answer here). Sometimes it goes through on the next push, other times I've had to wait up to a couple hours for it to work again. It's probably a good idea to open a support ticket with Heroku so they know something is borked.
If you aren't using a custom buildpack, have a look at Nitzan Shaked's answer.
UPDATE: In my case, where the buildpack was hosted on GitHub, Heroku Support advised to change the BUILDPACK_URL config var to use HTTPS instead of HTTP and it worked.
回答3:
If you're using a custom buildpack with github, make sure that your repository is public.
来源:https://stackoverflow.com/questions/18347479/heroku-push-rejected-some-references-to-some-heroku-app-i-dont-have