【问题标题】:Download file from remote http server with user credentials through Chef recipe通过 Chef 配方使用用户凭据从远程 http 服务器下载文件
【发布时间】:2017-08-16 13:43:10
【问题描述】:

我正在尝试从厨师食谱下载远程文件。如果服务器不需要用户名和密码,我可以使用以下命令下载文件。

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

但我的服务器需要用户名和密码才能下载文件。

如何在上面的厨师代码中包含用户名和密码?

【问题讨论】:

    标签: chef-infra chef-recipe chef-solo


    【解决方案1】:

    source 'https://username:password@www.example.org/whatever',别忘了sensitive true

    【讨论】:

      猜你喜欢
      • 2020-05-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-11-21
      • 2011-11-19
      • 1970-01-01
      • 1970-01-01
      • 2014-05-02
      相关资源
      最近更新 更多