4

I'm experiencing some problem with using the cf command line. The password works for logging in to bluemix.net web page but not in cf command line. What is wrong?

 $ cf login 
 API endpoint> https://api.ng.bluemix.net
 Email> xxxxxx@gmail.com
 Password> Authenticating... Credentials were rejected, please try again.
 Password> Authenticating... Credentials were rejected, please try again.
user4826201
  • 53
  • 1
  • 6
  • Which version of the `cf` binary? – nitind Apr 24 '15 at 03:36
  • @user4826201 could you try logging into http://bluemix.net? If you can't login there could you try resetting your password at https://www.ibm.com/account/profile?page=forgot&okurl=www-947.ibm.com%2FFIM%2Fsps%2FIBM_WWW_SAML20_EXTERNAL%2Fsaml20%2Flogininitial%3FRequestBinding%3DHTTPPost%26ResponseBinding%3DHTTPPost%26NameIdFormat%3DEmail%26PartnerId%3Dhttps%3A%2F%2Fidaas.ng.bluemix.net%2Fsps%2Fsaml20sp%2Fsaml20&failurl=https%3A%2F%2Fidaas.ng.bluemix.net%2Fidaas%2Fpublic%2Ftamlogin.jsp&cancelurl=https%3A%2F%2Fidaas.ng.bluemix.net%2Fidaas%2Fpublic%2Ftamlogin.jsp – Jeff Sloyer Apr 24 '15 at 12:54

5 Answers5

4

Are you using a Cygwin terminal? Try installing CF tool on your Window workstation directly if you are. There is a known issue with running CF using Cygwin.

CharlesL
  • 942
  • 5
  • 14
  • 7
    For reference, the known issue of running cf under Cygwin is documented at https://github.com/cloudfoundry/cli/issues/171 and the issue was closed with the rationale that "_Cygwin is not supported currently_". One user commented "I currently work around this issue using `cf auth login pwd` instead of `cf login`", so you may want to try that if you really want to stick with cygwin. – jimmc Apr 24 '15 at 12:29
  • 1
    Yes, this is it! Thanks CharlesL and jimmc! – user4826201 Apr 25 '15 at 05:17
1

I may be replying to very old post but it may help someone.

When using cf login in Cygwin or git bash provide username and password in the same command like below.

cf login [-a API_URL] [-u USERNAME] [-p PASSWORD]

This way you can login to PCF.

louisfischer
  • 1,968
  • 2
  • 20
  • 38
1

If using Cygwin or Git Bash, you can add winpty before the command to make it work:

winpty cf login

And you can create an alias in your bash startup script to avoid typing winpty every time:

alias cf='winpty cf'
badjr
  • 2,166
  • 3
  • 20
  • 31
0

Guess you are using Git Bash under Windows OS, it is a known issue. Suggest to use cmd.exe instead.

Richard
  • 2,080
  • 18
  • 17
-2

Try logging into UI at http://bluemix.net first. If that doesn't work you probably need to reset your password

Jeff Sloyer
  • 4,899
  • 1
  • 24
  • 48
  • 3
    This seems unlikely to be the problem. The original post states that the password works for logging in to bluemix.net web page. – jimmc Apr 24 '15 at 12:52
  • 1
    +1 to jimmc I'm able to log in via the bluemix.net webpage so it's not about a wrong password. – user4826201 Apr 25 '15 at 05:17
  • Hmm, it should let you in if you are using your same username and password. If you are 100% sure that you are and it still isn't working please send an email to id@bluemix.net and the support team can investigate your account. – Jeff Sloyer Apr 25 '15 at 12:35