0
votes

I recently made a google cloud account which was migrated from a .com.au email address to a .com email address. Now when I log in to Google Cloud Console, I correctly see my .com account and my permissions in IAM are owner, however, this migration does not seem to have been propagated to my Google Cloud shell and pre-existing Datalab instances.

When I try to do:

   datalab connect test1 --no-user-checking

I get the cloud shell to connect and state that I can:

   select *Change port > Port 8081*, and start using Datalab

However, when I go to port 8081 I get the error:

  Error: Unauthorized
  You are currently logged in as xxx.com.au which does not have access to Cloud Shell 3456864.

This is odd because in the Google Cloud Platform it clearly shows I am logged in as xxx.com

The same error occurs if I do a 'datalab create newbook' ... the compute engine instance is created, but when I go to connect to port 8081 it will not allow me access (same error as above).

The only exception is if I authenticate a local shell SDK with my XXX.com address and have done:

     gcloud components install datalab

Then I can run datalab connect test 1 without any user checking. So it is only the Google Cloud Platform that is not allowing the connection.

The cloud shell and code editor Beta both have the same error as above, i.e. somehow the cloudshell is not seeing that I am logged in with my .com new profile rather than my old .com.au profile even though the platform can clearly see the difference. I'd rather not delete my entire profile and start again so any ideas are appreciated.

2
You should raise this issue with google cloud support team. I don't think here you would get any help on this.Nitishkumar Singh

2 Answers

1
votes

Get credentials for your user account via a web-based authorization flow with the following command:

gcloud auth login

This command will provide you the link to get the verification code.

Once verified, your cloud shell configuration will be updated to the new account.

0
votes

Since this seems to be unsolved, I'll post the one solution I came across which has worked (as of now):

1) gcloud init

2) complete clearing of all browser caches

3) logout and remove browser from profile

4) restart computer

5) restart browser with new login

6) works!!!

I still got the error: "Permission denied (publickey). ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255]."

.... but Datalab is now accessible. I then tried again with a login from an incognito window and now it works without the permission error (but only in incognito mode). Not ideal, but will work in a pinch. This may be a cousin to some of the errors which can occur on GCP as seen in qwiklabs.