无法使用非Google帐户登录gcloud SDK

时间:2019-08-12 01:24:41

标签: gcloud

我通过我的Google帐户(jinchihe@gmail.com)与其他电子邮件(mymail@cn.waha.com)关联。 当我尝试运行gcloud auth login mymail@cn.waha.com时,打开一个Web浏览器,默认情况下为gmail,我选择了Use another account输入我的其他电子邮件和密码,然后仍然显示Google Cloud Sddk wants to access your Google Account jinchihe@gmail.com,我点击Allow,但屏幕显示

ERROR: (gcloud.auth.login) You attempted to log in as account [mymail@cn.waha.com] but the received credentials were for account [jinchihe@gmail.com].

Please check that your browser is logged in as account [mymail@cn.waha.com] and that you are using the correct browser profile.

似乎只能通过Google帐户登录?如何使用mymail@cn.waha.com登录,我需要在gcloud信息中显示mymail@cn.waha.com,以便通过身份验证。谢谢!

1 个答案:

答案 0 :(得分:0)

您可以使用以下身份之一登录:

  • Google帐户
  • 服务帐户
  • Google组G Suite域帐户

如果您的域是Google G套件域​​的一部分,那么您应该可以登录,使用第三方域(例如Hotmail,yahoo等)不会让您*。您声明可以通过浏览器“登录”到您的帐户并“允许”该权限。之后,您应该看到一个代码(文本的随机字符串),您必须将其复制并粘贴到Shell控制台中,然后才能继续进行身份验证。

*注意:您可以使用第三方电子邮件域创建Google帐户,只需转到Create your Coogle Account页并点击“改用我的当前电子邮件地址” 以介绍您的个人电子邮件(在您的情况下为“ mymail@cn.waha.com”)。

此外,根据错误消息,您正在使用“ mymail@cn.waha.com”运行命令,但是在浏览器上,您使用的是“ jinchihe@gmail.com”帐户登录。