Project

General

Profile

Downloading files from Redmine (using Linux console app)

Added by Fred Weiser over 8 years ago

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?

Thanks


Replies (2)

RE: Downloading files from Redmine (using Linux console app) - Added by Jonathan Cormier over 8 years ago

http://stackoverflow.com/questions/1324421/how-to-get-past-the-login-page-with-wget

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 over 7 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>:1234@support.criticallink.com/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.

    (1-2/2)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)