A new engineer needs to set up the gcloud CLI on their local machine and authenticate with a user account. Which command should they run after installing the SDK?
Trap 1: gcloud auth application-default login
Incorrect: This is for Application Default Credentials, not user account setup.
Trap 2: gcloud config set account
Incorrect: This sets the account but does not trigger authentication flow.
Trap 3: gcloud auth login
Incorrect: gcloud auth login only authenticates without setting project/region; it is not the initial setup command.
- A
gcloud init
Correct: gcloud init runs authentication and sets default project/region in a single command.
- B
gcloud auth application-default login
Why wrong: Incorrect: This is for Application Default Credentials, not user account setup.
- C
gcloud config set account
Why wrong: Incorrect: This sets the account but does not trigger authentication flow.
- D
gcloud auth login
Why wrong: Incorrect: gcloud auth login only authenticates without setting project/region; it is not the initial setup command.