-
Notifications
You must be signed in to change notification settings - Fork 941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"cf login " interactive password prompt fails on cygwin #171
Comments
Hey Guillaume, What you're describing sounds like a real bug I saw a few weeks ago on windows. Could you provide a little more information? Are you using cmd.exe, powershell or Cygwin? Sent From A Very Small Keyboard
|
You're right, it works properly with cmd.exe but fails within cygwin even if -u is not specified
I'm using cygin on win7
I can send you privately the output of
|
Thanks for confirming. I don't know when this will be fixed, but it is a known bug. For what it's worth, our supported clients on windows are powershell and cmd.exe You can also use the 'cf auth' command to authenticate non-interactively. Sent From A Very Small Keyboard
|
@gberche-orange @tjarratt We are closing this issue for now because Cygwin is not supported currently. There is a story in the CLI tracker project for this feature which can be found here. |
Also it seems that cygwin is not currently a supported environment for Windows. A little surprising, but makes it easier to explain why this doesn't work. |
+1 on this issue. Is cywgin still unsupported? Also, the tracker link is broken - was the story deleted? |
Another +1 here. As for the story, after sign-up, I get: "You are not allowed to view the requested page." |
+1 |
-1 for cygwin or windows... I kid, I kid, of course. We <3 our Windows users. Cheers. |
For windows users, a bash shell with productive features (searching in the history, clipboard cut/paste, completion on file path, alias to set CF_HOME to switch among CF instances...), makes a real difference in term of productivity when using the CF CLI. I currently work around this issue using |
+1 |
+1 for implementing Cygwin support or at least providing a workaround with the current "bug" |
+1 for Cygwin ;) |
it is the issue with cygwin. can't login |
another +1 for cygwin ( Git Bash actually ) |
+1 |
1 similar comment
+1 |
Thanks everbody for speaking up! I have created an exploratory story to find out what's involved (link to the story is in the next comment). We currently do platform specific stuff to make the interactivity work, and the team's initial concern was that golang may not support what we need to implement this. This will be investigated as part of this story. Cheers, |
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/121914309 The labels on this github issue will be updated when the story is started. |
FYI, having spent a day or so investigating, the team has found no way to make this work on Windows. It seems the required APIs are not available to us in Golang. In the meantime, if you have any other suggestions, or can provide us with Golang sample code to make it work, we'd love to take a look! |
PS: the issue seems to be the same as golang/go#13088. |
I was facing the same issue, fixed it by setting proxies , by running following command on windows |
I have recorded this as a known issue. Closing as a |
@dkoper thx for your updates! |
it seems that golang/go#13104 was solved, will there be an update? |
@dkoper what do you mean with "or option -f to suppress the prompts." on https://github.com/cloudfoundry/cli#known-issues |
@h0nIg We're still waiting for Golang to add support for this (see the golang issue I linked to, to which you also added a comment). The Cheers, |
I haven't tested this in Cygwin specifically, but the same symptoms exists when using the cli from within a git bash shell on Windows. Adding the following alias to your .bashrc file seems to work: alias cf='winpty cf' or just run this from your shell: echo alias cf="'winpty cf'" >> ~/.bashrc I hope this helps. |
I ran into an issue while using Babun. It doesn't seem to install winpty by default so the I installed https://github.com/tiangolo/babun-docker that tries to fix the same problem for docker and babun. Babun also uses zsh by default so running
is more appropriate |
+1 |
I was also facing the same issue. But I tried using in the command prompt, it works well. |
Also facing the same issue with git. Then as per above suggestion, I tried using cmd but getting below: Password> API endpoint: https://api.local.pcfdev.io (API version: 2.75.0) As you can see api.local.pcfdev.io. I have local VM, which password I should use? any default password? |
Just found out local default username and password $ cf login -a https://api.local.pcfdev.io --skip-ssl-validation |
Hi All, Please follow these instructions. Use the below command to verify your credentials. Thanks, |
@Arun |
FWIW, While installing the latest Git on Windows, I noticed in its release notes:
So @jmprice's suggestion seems to be their recommended work around. |
Running under the cygwin TERM allows for interactive prompts to work. C:\cygwin64\Cygwin.bat will do this. And you still get bash. |
For Windows GitBash users, it works when using bash.exe (located under |
Yes, indeed. It works if when launching Git Bash as "C:\Program Files\Git\bin\bash.exe" @loganmzz if it works under some flavor of Git Bash, than it is not issue of go referenced here as golang/go#13088, but issue of configuring Git Bash or some Git Bash default settings... |
This was a little tricky to find. Hopefully anyone having this issue that wants to just be able to git bash finds this comment from March 2017:
(This is what I posted in my group's chat: |
password should be interactively prompted for when -p is omitted, regardless of whether -u was specified.
At least, it should be more user-friendly to remind users that if they prefer interactive login (to avoid having password recorded in their shell history) then they should omit both password and login, otherwise the password won't be prompted and auth will fail:
The text was updated successfully, but these errors were encountered: