heroku login does not work with cygwin or git bash
This is now fixed. Just update your CLI.
Just run the following
$ heroku update
$ heroku login
OR
$ winpty heroku login -i
Or use cmd.exe instead
This is inconsistent. I installed Heroku into Cygwin using the standalone installer (https://toolbelt.heroku.com/install.sh) which worked fine (once I removed all the sudo commands in the install script). Some commands such as heroku apps and heroku logs work fine in the Cygwin shell (and ask for login) whereas directly calling heroku login or commands like heroku stack:set come up with the message that
Login is currently incompatible with git bash/Cygwin
pointing to this issue.
Because I installed the toolbelt using Cygwin, to run it using cmd I have to run
C:\Users\username\AppData\Local\heroku\heroku-cli
I get this error since I enabled 2fa on my account
I have installed newest Git... It may be certificates?
Any update here?
Sorry, I dont get it, what the solution here?
whats the solution?
It works with ZSH. cygstart zsh.
> $ heroku login
> Installing Heroku Toolbelt v4... done.
> For more information on Toolbelt v4: https://github.com/heroku/heroku-cli
> heroku-cli: Adding dependencies... ! mkdir $USERPROFILE\AppData\Local\heroku\tmp\node358338010\npm-3.3.10\node_modules\fstream-npm\node_modules\fstream-ignore\node_modules\minimatch\node_modules\brace-expansion\node_modules: The filename or extension is too long.
> done
> heroku-cli: Adding dependencies... ! mkdir $USERPROFILE\AppData\Local\heroku\tmp\node489516235\npm-3.3.10\node_modules\fstream-npm\node_modules\fstream-ignore\node_modules\minimatch\node_modules\brace-expansion\node_modules: The filename or extension is too long.
> done
> heroku-cli: Installing core plugins...Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... Error reading plugin heroku-cli-addons. Reinstalling... ! Command cancelled.
Need this fixed. Cannot run pg:ps command. I have psql in Cygwin.
C:\Users\Chloe\workspace\ShopWiz>heroku pg:ps
! The local psql command could not be located
! For help installing psql, see https://devcenter.heroku.com/articles/heroku-postgresql#local-setup
Tried cmd in Cygwin but it didn't work.
Chloe@xps ~/workspace/ShopWiz
$ cmd
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\Chloe\workspace\ShopWiz>heroku pg:ps
heroku pg:ps
Enter your Heroku credentials.
Email: [email protected]
Password (typing will be hidden):
Login is currently incompatible with git bash/cygwin
In the meantime, login via cmd.exe
https://github.com/heroku/heroku-cli/issues/84
C:\Users\Chloe\workspace\ShopWiz>
This message was a little unclear for me, so in case anyone is in a similar situation (after I activate 2FA, I received this error), here is what worked for me. I closed out Git Bash then opened the command prompt. From there, I was able to successfully login to heroku through "heroku login". I then closed the command prompt and re-launched Git Bash and everything worked fine.
In regards to @starrychloe issue, running cmd within Bash/Cygwin probably won't work either. You may need to close Cygwin and open a fresh command prompt and then login from there.
@eappleby suggestion is the preferred solution right now, run heroku login using the windows command prompt. This will drop your API key into your netrc, at which point you can open up cygwin or git bash and do whatever you need to. The root cause of this problem is that stdin is not a real terminal, so we cannot turn off the echo during the password request. One solution we have considered is popping up a dialog to get the username password as this is what git does within git bash, but I am not sure how soon I will be able to get to this.
@CMCDragonkai, nice one :)
Even better, just run cygstart zsh from the bash shell, then run heroku login, then close the zsh shell and bash works just fine.
What I really don't understand about this issue though is that other programs like ssh work fine hiding the password.
Login is currently incompatible with git bash/cygwin Log in with Windows cmd.exe, it will work:
@rbashish It appears that you did not enter your email or password correctly. I have been able to login successfully via cmd.exe. Could you please try again?
@ransombriggs Thank you for replying. Apparently I have stated the reason that login will not work in Git Bash and it will work on cmd.exe. Please read the second line.
And Intentionally, I have input the wrong email id and password to show that it does not give error as it used to give in Git bash.
I got this when I tried to login...

@velo Try using "cmd prompt". If you get the same error then there might be some problems with the dependent software - try reinstalling it.
@velo Could you open a separate issue? Could you include how you configured /cygdrive? The heroku command when run from cygwin basically re-executes itself with the ruby that is installed as part of the toolbelt. This is the line that is failing for you https://github.com/heroku/heroku/blob/master/resources/exe/heroku#L4 because $0 has /cygdrive prefixed in front of it.
It would be nice if this would get fixed, but in the mean time, the best way to launch a cmd prompt from a different (cygwin/git bash/etc.) shell is to run
$ start cmd
Got this error when using Mobaxterm:-

When can I expect the fix?