Get credentials for the Globus CLI.
Necessary before any Globus CLI commands which require authentication will work.
This command directs you to the page necessary to permit the Globus CLI to make API calls for you, and gets the OAuth2 tokens needed to use those permissions.
The default login method opens your browser to the Globus CLI’s authorization page, where you can read and consent to the permissions required to use the Globus CLI. The CLI then takes care of getting the credentials through a local server.
You can use the GLOBUS_PROFILE environment variable to switch between separate accounts without having to log out. If this variable is not set, logging in uses a default profile. See the docs for details:
If the CLI detects you are on a remote session, or the --no-local-server option is used, the CLI will instead print a link for you to manually follow to the Globus CLI’s authorization page. After consenting you will then need to copy and paste the given access code from the web to the CLI.
Manual authorization by copying and pasting an auth code. This option is implied if the CLI detects you are using a remote connection.
Do a fresh login, ignoring any existing credentials
A GCS Endpoint ID, for which manage_collections permissions will be requested. This option may be given multiple times
A flow ID, for which permissions will be requested. This option may be given multiple times.
- -v, --verbose
Control level of output.
- -h, --help
Show this message and exit.
0 on success.
1 if an error occurred.
2 if the command was used improperly.
3 if the command was used on the wrong type of object, e.g. a collection command used on an endpoint.
4 if the command has authentication or authorization requirements which were not met, as in ConsentRequired errors or missing logins.