I created a HTTP access token in the Project settings and I would like to use the token in a .netrc file in a Ubuntu machine. Is this possible and how do I enter the information in to the .netrc file if it is possible?
If you've created a token before January 2023:
echo "" > ~/.netrc-for-atlassianchmod 600 ~/.netrc-for-atlassianecho "machine <myhost>.atlassian.net login <my.name@email.address> password <64-bit token" >> ~/.netrc-for-atlassiancurl -n ~/.netrc-for-atlassian https://<myhost>.atlassian.net/rest/api/3/issue/<MY-ISSUE>
This has been working for me to great effect, however they've recently changed the api-token to a SIGNIFICANTLY longer string and every attempt to use the new api-token results in an error messageSo curl or netrc is somehow broken with the new implementation, so I was looking to ask this exact question, but for newer tokens...
After reading man netrc I figured it out:This method will work for 256-bit api tokens generated after January 2023
echo "" > ~/.netrc-for-atlassianchmod 600 ~/.netrc-for-atlassianecho "machine <myhost>.atlassian.net login <my.name@email.address> account <64-bit token" >> ~/.netrc-for-atlassiancurl -n ~/.netrc-for-atlassian https://<myhost>.atlassian.net/rest/api/3/issue/<MY-ISSUE>
That's it, now it works
It looks like you're new here. Sign in or register to get started.