Skip to content

Instantly share code, notes, and snippets.

@samratshaw
Created September 18, 2018 15:29
Show Gist options
  • Save samratshaw/1d72a41b29c04125a1a5c78fcc585477 to your computer and use it in GitHub Desktop.
Save samratshaw/1d72a41b29c04125a1a5c78fcc585477 to your computer and use it in GitHub Desktop.
Medium: Curl for retrieving Jenkins API Token
curl --silent --basic http://<username>:<password>@<jenkins-url>/me/configure | hxselect '#apiToken' | sed 's/.*value="\([^"]*\)".*/\1\n/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment