HEX
Server: Apache/2.4.65 (Ubuntu)
System: Linux ielts-store-v2 6.8.0-1036-gcp #38~22.04.1-Ubuntu SMP Thu Aug 14 01:19:18 UTC 2025 x86_64
User: root (0)
PHP: 7.2.34-54+ubuntu20.04.1+deb.sury.org+1
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
Upload Files
File: //snap/google-cloud-cli/394/help/man/man1/gcloud_alpha_auth_activate-service-account.1
.TH "GCLOUD_ALPHA_AUTH_ACTIVATE\-SERVICE\-ACCOUNT" 1



.SH "NAME"
.HP
gcloud alpha auth activate\-service\-account \- authorize access to Google Cloud with a service account



.SH "SYNOPSIS"
.HP
\f5gcloud alpha auth activate\-service\-account\fR [\fIACCOUNT\fR] \fB\-\-key\-file\fR=\fIKEY_FILE\fR [\fB\-\-password\-file\fR=\fIPASSWORD_FILE\fR\ |\ \fB\-\-prompt\-for\-password\fR] [\fIGCLOUD_WIDE_FLAG\ ...\fR]



.SH "DESCRIPTION"

\fB(ALPHA)\fR To allow \f5gcloud\fR (and other tools in Google Cloud CLI) to use
service account credentials to make requests, use this command to import these
credentials from a file that contains a private authorization key, and activate
them for use in \f5gcloud\fR. gcloud alpha auth activate\-service\-account
serves the same function as \f5gcloud auth login\fR but uses a service account
rather than Google user credentials.

For more information on authorization and credential types, see:
https://cloud.google.com/sdk/docs/authorizing.

\fIKey File\fR

To obtain the key file for this command, use either the Google Cloud Console
(https://console.cloud.google.com) or \f5gcloud iam service\-accounts keys
create\fR. The key file can be .json (preferred) or .p12 (legacy) format. In the
case of legacy .p12 files, a separate password might be required and is
displayed in the Console when you create the key.

\fICredentials\fR

Credentials will also be activated (similar to running \f5gcloud config set
account [ACCOUNT_NAME]\fR).

If a project is specified using the \f5\-\-project\fR flag, the project is set
in active configuration, which is the same as running \f5gcloud config set
project [PROJECT_NAME]\fR. Any previously active credentials, will be retained
(though no longer default) and can be displayed by running \f5gcloud auth
list\fR.

If you want to delete previous credentials, see \f5gcloud auth revoke\fR.

\fINote:\fR Service accounts use client quotas for tracking usage.



.SH "EXAMPLES"

To authorize \f5gcloud\fR to access Google Cloud using an existing service
account while also specifying a project, run:

.RS 2m
$ gcloud alpha auth activate\-service\-account \e
SERVICE_ACCOUNT@DOMAIN.COM \-\-key\-file=/path/key.json \e
\-\-project=PROJECT_ID
.RE



.SH "POSITIONAL ARGUMENTS"

.RS 2m
.TP 2m
[\fIACCOUNT\fR]

E\-mail address of the service account.


.RE
.sp

.SH "REQUIRED FLAGS"

.RS 2m
.TP 2m
\fB\-\-key\-file\fR=\fIKEY_FILE\fR

Path to the private key file.


.RE
.sp

.SH "OPTIONAL FLAGS"

.RS 2m
.TP 2m

At most one of these can be specified:


.RS 2m
.TP 2m
\fB\-\-password\-file\fR=\fIPASSWORD_FILE\fR

Path to a file containing the password for the service account private key (only
for a .p12 file).

.TP 2m
\fB\-\-prompt\-for\-password\fR

Prompt for the password for the service account private key (only for a .p12
file).


.RE
.RE
.sp

.SH "GCLOUD WIDE FLAGS"

These flags are available to all commands: \-\-access\-token\-file, \-\-account,
\-\-billing\-project, \-\-configuration, \-\-flags\-file, \-\-flatten,
\-\-format, \-\-help, \-\-impersonate\-service\-account, \-\-log\-http,
\-\-project, \-\-quiet, \-\-trace\-token, \-\-user\-output\-enabled,
\-\-verbosity.

Run \fB$ gcloud help\fR for details.



.SH "NOTES"

This command is currently in alpha and might change without notice. If this
command fails with API permission errors despite specifying the correct project,
you might be trying to access an API with an invitation\-only early access
allowlist. These variants are also available:

.RS 2m
$ gcloud auth activate\-service\-account
.RE

.RS 2m
$ gcloud beta auth activate\-service\-account
.RE