我使用的是廚師下載war文件到從nexus.The配方文件夾獲得Nexus下載神器如下廚師 - 使用remote_file資源
remote_file '/home/Test/AAA.war' do
source 'https://IP.com:8082/ URL Of the Repo/AAA.war'
owner 'root'
group 'root'
mode '0755'
action :create
end
但是如果我運行這個配方,我得到未經授權的訪問錯誤。
是否需要爲nexus登錄提供用戶名和密碼?
我應該寫一個批處理腳本從nexus而不是配方下載嗎?
Riotgames [神器](https://github.com/RiotGamesCookbooks/artifact-cookbook)cookbook可以作爲靈感的幫助(根據我所知,不再維護)。特別是從nexus部分下載[這裏](https://github.com/RiotGamesCookbooks/artifact-cookbook/blob/master/libraries/chef_artifact_nexus.rb)以及他們的nexus CLI gem [here](https:// github。 com/RiotGamesMinions/nexus_cli) – Tensibai