简体   繁体   中英

“Git Push Heroku Master” - Cannot login to heroku - Cloud9 IDE

Having troubles with heroku. This problem kind of came out of nowhere. I've been pushing updates for months without error and all of a sudden I'm having problems.

When I do Git Push Heroku Master (on C9) I get prompted to login:

> remote: !       WARNING: remote: !       Do not authenticate with
> username and password using git. remote: !       Run `heroku login` to
> update your credentials, then retry the git command.

However if I run "heroku login" I get this error:

undefined method `[]' for nil:NilClass
/usr/local/heroku/lib/heroku/jsplugin.rb:59:in `commands'
/usr/local/heroku/lib/heroku/jsplugin.rb:208:in `find_command'
/usr/local/heroku/lib/heroku/jsplugin.rb:12:in `try_takeover'
/usr/local/heroku/lib/heroku/cli.rb:25:in `start'
/usr/bin/heroku:25:in `<main>'
 !    Heroku client internal error.
 !    Search for help at: https://help.heroku.com
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new

    Error:       undefined method `[]' for nil:NilClass (NoMethodError)
    Command:     heroku login
    Version:     heroku-toolbelt/3.42.20 (x86_64-linux) ruby/2.2.1


    More information in /home/ubuntu/.heroku/error.log

I've seen the advice to try the following but when I try I get the same error above:

username : blank

password : heroku auth token

Take a look at this & this .

In the C9 console run: rm -rf ~/.local/share/heroku

Then run heroku login and log back in. Good to go!

From Heroku docs:

If you continue to have problems and the CLI is up to date, or if updating fails for other reasons, you can reset the CLI by deleting its user directories. These directories are replaced automatically and you will not be logged out, but you will lose any installed plugins

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM