我正在尝试从大厨食谱下载远程文件。如果服务器不需要用户名和密码,我可以使用以下命令下载文件。
remote_file "/destination-folder/large-file.tar.gz" do
source "http://www.example.org/large-file.tar.gz
但我的服务器需要用户名和密码来下载文件。
如何在上面的厨师代码中加入用户名和密码?
答案 0 :(得分:2)
source 'https://username:password@www.example.org/whatever'
,也不要忘记sensitive true
。