-
-
Notifications
You must be signed in to change notification settings - Fork 259
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Command failed: git push heroku HEAD:refs/heads/main --force #84
Comments
Same.
My action: - name: deploy to heroku
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: ${{secrets.HEROKU_APP_NAME}}
heroku_email: ${{secrets.HEROKU_EMAIL}}
branch: main
dontuseforce: true |
+1
|
@AkhileshNS could you please help us resolve this issue? This has been a very common issue I have faced. It occurs sometimes and sometimes it doesn't. |
@IshaanOhri I couldn't wait for a fix or a response from the developers, so I started using Heroku's automatic deploy. 😄 Maybe you should try, cheers. |
@AkhileshNS This action does not work anymore because of this error, could you have a look at the issue? Indeed what @rn4n proposes is a workaround for CD. |
Seems to be failing here and it's not picking up the |
I find this to be a great walkaround. Thanks! |
TL;DR: Ensure your secrets are defined and accessible. For those of you discovering this issue today, I had the same problem. I determined it was being caused by the HEROKU_API_KEY not being defined in secrets for the repository. The error message is something of a misnomer as it shows HTH |
Any status updates on this? |
Hey everyone, sorry about the extremely delayed response (COVID-19 + College is making it hard to stay on track with this). But I have been working on a fix on this for a while, I haven't been able to resolve it yet. My suspicion is that these could likely be multiple issues layered behind a common logging message (so there's obviously a need to improve the logging on these things). I am working on this, I'm not quite near a fix yet but I am working. I'll try and keep updated from now on and hopefully resolve this in a new release soon |
@AkhileshNS please I'll appreciate it if we can get an update on this when resolved, thanks. |
I'll have an update by tomorrow |
@AkhileshNS Any further updates please? |
My deployments started failing sometimes with the following error:
It's weird because retrying the job usually makes it work 🤔 so definitely not an issue with secrets not being set. |
"git push heroku main " is not uploading. It is showing error: src refspec main does not match any |
Guys previously I ran through the same issue only to find out that the problem is from the way I started my secret. |
@AkhileshNS , now it has been a year. any update ? |
when i run on local i need to add heroku remote, so same is required in action |
In my case updating secret API_KEY and EMAIL_ID again, worked for me! |
In my case when trying to add the Heroku Remote I am getting an error, it seems the assumption the @AkhileshNS made that this is happening for multiple reasons is correct.
|
We were having a similar issue (if not the same). Turns out we forgot to add our bot account to the Heroku application (with Deploy access) (Instead only added it to the pipeline 🤦♂️). Doing that, plus the below name: Deploy
concurrency:
group: deploy
cancel-in-progress: false
on:
push:
branches:
- master
jobs:
deploy:
name: Deploy
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Deploy code
uses: akhileshns/heroku-deploy@v3.12.12
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "sample-app-name"
heroku_email: "bot@sample.com"
team: "sample-team"
dontuseforce: true
dontautocreate: true Hope this helps someone. |
Interestingly for me just regenerating the deploy token fixed the problem. |
This worked for me, thank you! |
This worked for me too, thank you! |
I got this issue after resetting my heroku login/password. I had to regenerate new tokens and it fixed the issue |
Freaking Genius! Thanks 😁 |
Regenerating the API key helped!!! Thanks. |
My solution: Generate a new HEROKU_API_KEY
My file:
|
my file on: deploy: Have regenerated the api key severally. |
Updated Heroku invalidated API keys in April 2022: https://blog.heroku.com/april-2022-incident-review Your once valid API keys are now invalid and this error message is hiding that this is the actual problem. |
In my case, I had created my secrets under dependentbot, so I had to create the secrets under action and it worked successfully. |
Error I received
My file:
The text was updated successfully, but these errors were encountered: