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, 2020 in GCP by akhtar
• 38,210 points
112 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, 2020 by MD
• 95,300 points

Related Questions In GCP

+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, 2020 in GCP by MD
• 95,300 points
191 views
+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, 2020 in GCP by MD
• 95,300 points
331 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, 2020 in GCP by MD
• 95,300 points
427 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, 2020 in GCP by MD
• 95,300 points
274 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, 2020 in GCP by MD
• 95,300 points
154 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, 2020 in GCP by akhtar
• 38,210 points
230 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, 2020 in GCP by MD
• 95,300 points
293 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, 2020 in GCP by MD
• 95,300 points
250 views
0 votes
1 answer

How to create a new project in GCP using the command line?

Hi@akhtar, You need to configure GCP SDK in ...READ MORE

answered Nov 9, 2020 in GCP by MD
• 95,300 points
143 views