问题
Many times I have the need to download files (e.g. archives) from a remote repository (e.g. maven-repo) which is protected by username/password.
Its easy to get such a file with curl or wget, but when I don't like to see the password on the logs, maybe there is a better/embedded way to do this from within a jenkins workflow? And how do I combine it with credentials managed by jenkins credential plugin?
回答1:
Use the Credentials Binding plugin, which integrates with Workflow.
来源:https://stackoverflow.com/questions/29746313/how-to-download-protected-resources-in-a-jenkins-workflow