Difference between revisions of "Gcloud auth login"

From wikieduonline
Jump to navigation Jump to search
 
(19 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{lowercase}}
 
{{lowercase}}
 +
 +
[[gcloud auth]] login
 +
[[gcloud auth login --no-browser]]
  
 +
== Examples ==
 +
[[gcloud auth]] login
 +
Go to the following link in your browser:
 +
    https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=.../...
 +
 +
You are now logged in as [your_username@your_domain.com].
 +
Your current [[project]] is [your-project].  You can change this setting by running:
 +
  $ [[gcloud config set project]] [[PROJECT_ID]]
  
  
 +
[[gcloud auth]] login
 
  Go to the following link in your browser:
 
  Go to the following link in your browser:
 
     https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=.../...
 
     https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=.../...
 
   
 
   
 
  Enter verification code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
  Enter verification code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
+
 
  You are now logged in as [your_username@your_domain.com].
 
  You are now logged in as [your_username@your_domain.com].
 
  Your current [[project]] is [None].  You can change this setting by running:
 
  Your current [[project]] is [None].  You can change this setting by running:
   $ ]]gcloud config set project]] PROJECT_ID
+
   $ [[gcloud config set project]] [[PROJECT_ID]]
 +
 
 +
== Errors ==
 +
gcloud auth login
 +
Your browser has been opened to visit:
 +
 +
    https://accounts.google.com/o/oauth2/auth?response_type=code&cli.../...od=S256
 +
 +
ERROR: [[gcloud crashed]] ([[ConnectionError]]): HTTPSConnectionPool(host='[[oauth2.googleapis.com]]',
 +
port=443): Max retries exceeded with url: /token (Caused by
 +
NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x1044c4790>: Failed to
 +
establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
 +
 +
If you would like to report this issue, please run the following command:
 +
  [[gcloud feedback]]
 +
 +
To check gcloud for common problems, please run the following command:
 +
  [[gcloud info --run-diagnostics]]
 +
 
 +
 
 +
== Related ==
 +
* <code>[[gcloud projects list]]</code>
 +
* <code>[[gcloud auth activate-service-account]]</code>
 +
* <code>[[gcloud auth list]]</code>
 +
* <code>[[gcloud auth application-default login]]</code>
 +
* <code>[[curl]]</code>
 +
* <code>[[Cannot GET /]]</code>
 +
* <code>[[gcloud init]]</code>
  
 
== See also ==
 
== See also ==
 
* {{gcloud auth}}
 
* {{gcloud auth}}
 +
* {{gcloud config}}
 
* {{gcloud}}
 
* {{gcloud}}
  
 
[[Category:GCP]]
 
[[Category:GCP]]

Latest revision as of 05:26, 3 November 2022

gcloud auth login
gcloud auth login --no-browser

Examples[edit]

gcloud auth login
Go to the following link in your browser:
    https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=.../...

You are now logged in as [your_username@your_domain.com].
Your current project is [your-project].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID


gcloud auth login
Go to the following link in your browser:
    https://accounts.google.com/o/oauth2/auth?response_type=code&client_id=.../...

Enter verification code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

You are now logged in as [your_username@your_domain.com].
Your current project is [None].  You can change this setting by running:
  $ gcloud config set project PROJECT_ID

Errors[edit]

gcloud auth login
Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/auth?response_type=code&cli.../...od=S256

ERROR: gcloud crashed (ConnectionError): HTTPSConnectionPool(host='oauth2.googleapis.com', 
port=443): Max retries exceeded with url: /token (Caused by 
NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x1044c4790>: Failed to 
establish a new connection: [Errno 8] nodename nor servname provided, or not known'))

If you would like to report this issue, please run the following command:
  gcloud feedback

To check gcloud for common problems, please run the following command:
  gcloud info --run-diagnostics


Related[edit]

See also[edit]

Advertising: