Use .netrc for Secure Token Storage
mainTo keep API tokens out of config.json while using basic or bearer authentication, you can use a ~/.netrc file. The CLI resolves tokens with the following precedence:
- Environment variable /
--tokenflag - Profile
tokeninconfig.json .netrcentry
Format for ~/.netrc (or ~/_netrc on Windows):
For Basic Auth (requires machine to match domain and login to match email):
machine your-domain.atlassian.net
login your.email@example.com
password your-api-tokenFor Bearer Auth (only machine is matched):
machine your-domain.atlassian.net
password your-personal-access-tokenNote: .netrc does not support mtls, cookie, or none authentication types.