我创建了一个Maven存储库,并将工件上传到该存储库中。 我正在尝试通过使用ansible剧本从jfrog神器库下载神器。我写过这样的剧本。
- hosts: localhost
tasks:
- name: check the latest version file
get_url:
url: https://artifactory.com:8081/artifactory/Examplemavenrepo/ext-
release-local/anil.tar.gz
dest: /home/anil/
checksum: sha256:b2d62aab354a581b3d578c56506321924b2ebc36823f1c527dc6091bd51459e6
我收到此错误:
fatal: [localhost]: FAILED! => {
"changed": false,
"dest": "/home/anil",
"msg": "Request failed", "response": "HTTP Error 404: Not Found",
"state": "absent",
"status_code": 404,
"url": "https://artifactory.com:8081/artifactory/Examplemavenrepo/ext-release-local/anil.tar.gz"
}
此后,我也尝试使用api键,上面也遇到了相同的错误
答案 0 :(得分:0)
---
- name: Download artifact test
become: true
get_url:
url: your_artifact_url_here
dest: your_dest_folder_here
url_username: your_username
url_password: your_api_key
您可以使用用户名和API密钥下载工件。
获取您的api_key 转到工件URL 点击右上角的帐户,然后编辑您的个人资料。 再输入一次本地密码以访问该页面并更改密码。 在该页面中,您将看到您可以使用的REST API密钥和加密密码。