I was originally using Jenkins plugin (Jenkins JIRA Pipeline Steps) to integrate Jenkins with Jira. Unfortunately, I am unable to successfully download the attachment(s) to my Jenkins worker node. Debugging this further, I attempted to use curl to GET the attachment: curl -L -O -k -u 'adrianj@ibm.com:<myToken' -X GET http://<myhost>/secure/attachment/3454761/test.txt. The file downloads, but the contents of the file is invalid and reference a 403 forbidden message:
<body id="jira" class="aui-layout aui-style-default page-type-message " data-version="8.13.9" >
<div class="aui-page-panel" ><div class="aui-page-panel-inner">
<main role="main" id="main" class="aui-page-panel-content" >
<div class="aui-page-header" ><div class="aui-page-header-inner">
<div class="aui-page-header-main" >
<h1>Forbidden (403)</h1>
</div>
</div></div>
<div class="aui-message aui-message-warning warning">
<p>Encountered a <code>"403 - Forbidden"</code> error while loading this page.</p>
<p>Basic Auth with password is disabled by the API Token Authentication app</p>
<p><a href="/secure/MyJiraHome.jspa">Go to Jira home</a></p>
</div>
</main>
</div></div>
</body>
Are there in proven solutions in place to download Jira attachments?