log in to your Atlassian account
1 2Usage: forge login [options]
1 2 3 4 5 6--verbose enable verbose mode -u, --email <user email> specify the email to use --read-token read the API token from stdin --non-interactive run the command without input prompts -h, --help display help for command
1 2forge login --email FORGE_EMAIL
Prompts you to enter a scoped API token then logs you in to Forge with the specified credentials.
1 2cat token.txt | forge login --email FORGE_EMAIL --read-token
Reads the API token from stdin (here, from a file), then logs you in to Forge with the specified credentials. The token isn't passed as an argument, so it doesn't appear in your shell history or the process list.
The -t, --token option was removed in Forge CLI 16. Use --read-token to pipe the token in, or leave it out to be prompted.
The forge login command allows you to authenticate to Atlassian so that you can run Forge commands requiring an authenticated user. When you log in, Forge stores your credentials in a dedicated file in your user-local application data directory. Access to the directory and file is restricted using operating system permissions.
You can optionally provide your credentials by setting environment variables instead of using forge login. This method is often used when automating Forge tasks.
Both methods require that you specify an Atlassian API scoped token as well as an email address that you have registered with Atlassian. If you do not yet have an Atlassian API scoped token, see Log in with an Atlassian API scoped token for steps to create one.
In non-interactive mode, the command produces an error rather than prompting for values if --email or a token piped in with --read-token isn't provided.
forge logout command referenceRate this page: