How to authenticate with the correct account in GCP from Command Line?

0 votes

Hi Guys,

I have two accounts in GCP. How can I select the account from the command line?

Sep 24 in GCP by akhtar
• 27,980 points
20 views

1 answer to this question.

0 votes

Hi@akhtar,

You can check your accounts from the command line using the below command.

$ gcloud auth list
* account 1
  account 2

And to set a particular account you can sue the belwo command.

$ gcloud config set account `ACCOUNT`
answered Sep 24 by MD
• 64,820 points

Related Questions In GCP

+2 votes
1 answer

How to create a VPC on GCP from command line?

Hi@akhtar, To create a personal network, you need ...READ MORE

answered Aug 24 in GCP by MD
• 64,820 points
90 views
0 votes
1 answer

How to change the project in GCP using CLI command?

Hi@akhtar, If you configured GCP SDK in your ...READ MORE

answered Sep 13 in GCP by MD
• 64,820 points
34 views
0 votes
1 answer

How to delete GCP project from command line?

Hi@akhtar, You can create a project from your ...READ MORE

answered Sep 24 in GCP by MD
• 64,820 points
42 views
0 votes
1 answer

What are the service accounts in GCP? How to create one?

The special accounts associated with a project are called the Service Accounts. The ...READ MORE

answered Oct 9, 2019 in GCP by Sirajul
• 58,130 points
90 views
+2 votes
1 answer

How to create a project in GCP Cloud?

Hi@akhtar, To deploy your app on App Engine, ...READ MORE

answered Aug 22 in GCP by MD
• 64,820 points
45 views
+2 votes
1 answer

How to activate GCP Cloud Shell?

Hi@MD, You can follow the below steps to ...READ MORE

answered Aug 22 in GCP by akhtar
• 27,980 points
59 views
+2 votes
1 answer

How to list down all the projects in GCP Cloud?

Hi@akhtar, GCP Shell has a command named gcloud. ...READ MORE

answered Aug 22 in GCP by MD
• 64,820 points
42 views
+2 votes
1 answer

How to do SSH in GCP instance from command line?

Hi@akhtar, You can do SSH to GCP instance ...READ MORE

answered Aug 24 in GCP by MD
• 64,820 points
78 views
+2 votes
1 answer

How to launch one instance on GCP Cloud from command line?

Hi@akhtar, You can compute service in GCP to launch ...READ MORE

answered Aug 24 in GCP by MD
• 64,820 points
67 views