The windows_zipfile
custom resource does not have any properties to accept credentials for the URL. More importantly the cookbook as a whole is being deprecated in favour of the native archive_file
resource.
Note: This resource has been deprecated as Chef Infra Client 15.0 shipped with a new archive_file resource, which natively handles multiple archive formats. Please update any cookbooks using this resource to instead use the archive_file
resource.
I would recommend downloading the file using remote_file resource by providing the credentials. Then you can use archive_file
(if Chef version > 15), or windows_zipfile
to extract the file from local path.
remote_file 'C:\test_app.zip' do
source 'https://artifactory/repoName/ApplicationName/zipfile.zip'
remote_user 'user'
remote_password 'secret'
end
# showing example for 'archive_file'
archive_file 'C:\test_app' do
source 'C:\test_app.zip'
action :extract
end