简体   繁体   English

“ Git Push Heroku Master”-无法登录到Heroku-Cloud9 IDE

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

Having troubles with heroku. 在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: 当我执行Git Push Heroku Master(在C9上)时,系统提示您登录:

> 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: 但是,如果我运行“ heroku login”,则会出现此错误:

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 在C9控制台中运行: rm -rf ~/.local/share/heroku

Then run heroku login and log back in. Good to go! 然后运行heroku login并重新heroku login

From Heroku docs: 来自Heroku的文档:

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. 如果您仍然遇到问题并且CLI是最新的,或者由于其他原因更新失败,则可以通过删除其用户目录来重置CLI。 These directories are replaced automatically and you will not be logged out, but you will lose any installed plugins 这些目录将被自动替换,并且您不会注销,但是您将丢失所有已安装的插件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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