Downloading files from Redmine (using Linux console app)
Is there a favored method for downloading files from the Critical Link Redmine site using a Linux console app? My software build server is a console only machine, and I'd like to be able to access CL Redmine files.
I have tried "wget --no-check-certificate <file url>", but the file only contains the html for the redmine login page; seems if I can get authenticated, it might work (I do have an account).
Are there any other protocols that may work, such as ftp or ssh?
RE: Downloading files from Redmine (using Linux console app) - Added by Jonathan Cormier almost 5 years ago
Below seemed to work. Replace things in <>.
wget --no-check-certificate --save-cookies=cookies.txt --keep-session-cookies --delete-after --post-data='username=<username>&password=<password>' https://support.criticallink.com/redmine/login wget --no-check-certificate --load-cookies=cookies.txt <file url>
RE: Downloading files from Redmine (using Linux console app) - Added by Jonathan Cormier almost 4 years ago
With the redmine update you now have to deal with the csrf token in order to login. So I created the attached bash file.
Unfortunately after I wrote this I found an easier way.
curl --remote-name https://<api_key>:firstname.lastname@example.org/redmine/attachments/download/8271/MitySOM-335X_Dev_SD_512MB_NAND.zip
To get your api key, go to https://support.criticallink.com/redmine/my/account and on right hand sign look for "API access key".
You can replace "<api_key>:1234" with "<user>:<pass>" but the api key allows you to create scripts without saving your password in plaintext.