Search code examples
chef-infrachef-recipechef-solo

Download file from remote http server with user credentials through Chef recipe


I'm trying to download remote file from chef recipe. I can download file using below command if the server does not require username and password.

remote_file "/destination-folder/large-file.tar.gz" do source "http://www.example.org/large-file.tar.gz

but my server require username and password to download the file.

how can I include username and password into above chef code?


Solution

  • source 'https://username:[email protected]/whatever', and don't forget sensitive true too.