If you need to download a secured Artifactory object from an automation server, and you don’t have a service account that you can use, you can go to artifactory for your user, generate a token, and get it.
Then you can simply do this:
wget --header='X-JFrog-Art-Api: your-very-long-token-from-artifactory' https://company.com/artifactory/local-pypi-repo/some_repo/some_project/artifact_name-3.1.0-py3-none-any.whl
WGet will use the artifactory token in its header and artifactory will allow you to download the artifact as if you are yourself.
Word of caution; while you haven’t revealed your user-name and password, this token can effectively be used for any Artifactory API as if its you. So, be cautious with who else can see this still :).
how can i get “X-JFrog-Art-Api” ?
LikeLiked by 1 person
You get it from your user settings page when you’re logged into the Artifactory API. Preferably, use a service account to log in and get that one so it’s not tied to an individual user that may leave your company.
LikeLike