question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Command failed: heroku login

See original GitHub issue

Hi, hope you’re having a good weekend!

I am currently getting this error:

Created and wrote to ~/.netrc
 ›   Warning: Our terms of service have changed: 
 ›   https://dashboard.heroku.com/terms-of-service
Error: Error: Command failed: heroku login
 ›   Warning: Our terms of service have changed: 
 ›   https://dashboard.heroku.com/terms-of-service
 ›   Error: Cannot log in with HEROKU_API_KEY set

 ›   Error: Cannot log in with HEROKU_API_KEY set

I have double and tripple checked my heroku_api_key , heroku_app_name and heroku_email and they are all correct. Was there a change to how the heroku api works recently?

Below is my config:

      - name: Deploy Production
        uses: akhileshns/heroku-deploy@v3.8.9 # This is the action
        if: contains(github.ref, 'main')
        with:
          heroku_api_key: ${{ env.HEROKU_API_KEY }}
          heroku_app_name: ${{ env.HEROKU_APP_NAME_PRODUCTION }}
          heroku_email: ${{ env.HEROKU_EMAIL }}
          healthcheck: ${{ env.HEROKU_HEALTH_CHECK_URL_PRODUCTION }}
          checkstring: 'ok'
          rollbackonhealthcheckfailed: true

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:1
  • Comments:16 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
AkhileshNScommented, Feb 4, 2021

hey @cj and @kylefritz, based on the conversation I had with @engeldevelopment. I’ve concluded the problem is likely due to Git now switching from “master” to “main”. I’ve updated the action to push to “main” by default (or you can push to master by just adding remote_branch: master). Have a look at the documentation for more info. Let me know if this solves your problem and if it does please close this issue

1reaction
AkhileshNScommented, Feb 3, 2021

Based on the research I’ve done, this might have something to do with Git moving from the ‘master’ branch to ‘main’.

On that note, could you try adding the following property to your action implementation

remote_branch: main
Read more comments on GitHub >

github_iconTop Results From Across the Web

Why can't I connect or authenticate with the Heroku Command ...
Verify that you're on the latest version of the Heroku Command Line by running heroku update . · Enable debugging during login. Make...
Read more >
Heroku Login fails - Stack Overflow
Heroku Login fails · 1. This has nothing to do with java... It is an issue with the heroku toolbelt. – 0xcaff ·...
Read more >
"heroku login" command not working - No response - Reddit
So Im trying to deploy a simple React app to Heroku. I remember 'heroku login' command used to work fine a few months...
Read more >
Heroku Login in Command Line / Terminal - YouTube
How to log in to Heroku Command Line Interface ( Heroku CLI) in command line (Windows) or terminal (Mac, Linux). And how to...
Read more >
Heroku Login Not Working - LoginsLink
Hit the command "Heroku Logout" from you cli terminal. If the error persists clear your browser cache. So that you can login again....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found