I have a PWS account and after installing Cloud Foundry command line interface (CLI), I tried login from windows command prompt, CYGWIN terminal and Gitbash.
In all the above cases, I cannot login by cf login
But I am able to login if i issue the command:
cf auth email password
But the problem with this command is that I am exposing my password on the command line.
Question: I would like to know how users of Cloud Foundry Command Line Interface, login to the PWS.
Update 04/29: Sharing what i see while trying cf login
in Cygwin
and Gitbash
. Both gives the same type of error response.
Note that I don't want to put -p password as plaintext in command line unless I am asked explicitly.
mypc /d/spiderman
$ cf login -a https://api.run.pivotal.io
API endpoint: https://api.run.pivotal.io
Email> myemail@gmail.com
Authenticating...
Credentials were rejected, please try again.
Authenticating...
Credentials were rejected, please try again.
Authenticating...
Credentials were rejected, please try again.
API endpoint: https://api.run.pivotal.io (API version: 2.80.0)
Not logged in. Use 'cf login' to log in.
FAILED
Unable to authenticate.
It's not even asking for password, and responding that unable to authenticate!
In windows command prompt:
D:\spiderman>cf login
API endpoint: https://api.run.pivotal.io
Email> myemail@gmail.com
Password> [I gave correct password]
Authenticating...
Credentials were rejected, please try again
.
@Kumaresh Babu I tried what you suggested and still unable to authenticate [Tried in cygwin]
mypc /d/spiderman
$ cf login -a https://api.run.pivotal.io --skip-ssl-validation -o my-org -s development API endpoint: https://api.run.pivotal.io
Email> myemail@gmail.com
Authenticating...
Credentials were rejected, please try again.
Authenticating...
Credentials were rejected, please try again.
Authenticating...
Credentials were rejected, please try again.
API endpoint: https://api.run.pivotal.io (API version: 2.80.0)
Not logged in. Use 'cf login' to log in.
FAILED
Unable to authenticate.
@Kumaresh Babu
I tried the same command in windows command prompt and it worked, I am able to login.
cf login -a https://api.run.pivotal.io --skip-ssl-validation -o my-org -s development
API endpoint: https://api.run.pivotal.io
Email> myemail@gmail.com
Password>
Authenticating...
OK
Targeted org my-org
Targeted space development
API endpoint: https://api.run.pivotal.io (API version: 2.80.0)
User: myemail@gmail.com
Org: my-org
Space: development