首页 > 解决方案 > Cloud Foundry:凭据被拒绝

问题描述

我在使用 cf 登录时遇到问题。每当我尝试登录时,我都会收到以下错误:

Credentials were rejected, please try again.

现在我知道这是一个已知问题。但即使有其他选择,我总是得到同样的信息。

到目前为止我已经尝试过:

Git CMD; cmd.exe; Powershell;
cf login -u mail@adress.com; (and different variations)
cf auth "Mail@Adress.com" "MyPassword";

还有什么我可以尝试的或者我错过了什么?

标签: cloud-foundry

解决方案


When you run cf login or cf auth and specify a username/password, you are attempting to authenticate with UAA using a standard password based authentication. If your company uses single sign-on (i.e. SSO), this will not work.

When your company uses SSO, you need to run cf login -sso (that's it, no other flags). In this case, the cf cli will give you a link to click. You'll go to this link in your browser and it will display a one-time password. The cf cli will then prompt you for the one-time password, type it in and the cli will use that to log you in with your company's SSO system.

Again, if your company has set up SSO you must use the cf login -sso option to login. As far as I know, there's no way to tell from the cf cli if your company requires SSO, but you can tell if you go to login.system_domain in your browser (where system_domain the the DNS entry set up for CF). When you go to that page, you'll see the login form and when SSO is set up the bottom of the form will have a link that says "click here to login with SSO" or something like that. That link only shows up when SSO is enabled.


推荐阅读