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

て烟熏妆下的殇ゞ 提交于 2019-12-10 10:45:47

问题


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

回答1:


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



来源:https://stackoverflow.com/questions/50203372/git-push-heroku-master-cannot-login-to-heroku-cloud9-ide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!