Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save visitbethel/2c5cea47ed07ca8736bd37548292ccf5 to your computer and use it in GitHub Desktop.
Save visitbethel/2c5cea47ed07ca8736bd37548292ccf5 to your computer and use it in GitHub Desktop.
node {
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'mylogin',
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
sh '''
set +x
curl -u $USERNAME:$PASSWORD https://private.server/ > output
'''
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment