Login
Log in with Unity Hub or a service account.
Read time 2 minutesLast updated 3 days ago
Log in with Unity Hub or a service account. Service account credentials are stored locally.
Interactive usage
By default, calling this command prompts you to choose a login method: or .
Choosing prompts you to enter your service account and .
Unity HubService AccountService Accountkey-idsecret-keyugs loginChoose a login method: Service AccountEnter your key-id: <your-key-id>Enter your secret-key: <your-secret-key>
Unity Hub
Log in with the account signed in to Unity Hub. Unity Hub must be running and signed in.
ugs login --unity-hub
--unity-hubUGS_CLI_USE_HUB_AUTHtrueAutomated usage
You can automate login by using both the option and the option.
The option expects your service account as argument.
The option expects your in the standard input.
--service-key-id--secret-key-stdinThe
--service-key-idkey-idThe
--secret-key-stdinsecret-keyugs login --service-key-id "your-key-id" --secret-key-stdin < "secret-key-file"
Where is your service account , and is the path to a file containing
your service account .
"your-key-id"key-id"secret-key-file"secret keyOptions
Alias | Description | |
|---|---|---|
| key-id | --service-key-id | The key-id of your service account. Must be used with "--secret-key-stdin". |
| secret-key | --secret-key-stdin | The secret-key of your service account. Must be used with "--service-key-id". |
| unity-hub | --unity-hub | Log in with Unity Hub. |
| help | -?, -h, --help | Display help and usage information. |
| quiet | -q, --quiet | Reduce logging to a minimum. |
| json | -j, --json | Use JSON as the output format. |
Environment Variables
Logging in with Environment Variables
To log in manually use the command.
ugs loginTo log in with system environment variables, set and to your
system's environment variables.
UGS_CLI_SERVICE_KEY_IDUGS_CLI_SERVICE_SECRET_KEYAuthenticated calls use the first available credential, in this order:
- (a bearer token)
UGS_CLI_AUTH_TOKEN - (Unity Hub)
UGS_CLI_USE_HUB_AUTH - The credential saved by
ugs login - and
UGS_CLI_SERVICE_KEY_IDUGS_CLI_SERVICE_SECRET_KEY