snippetMinor
How can I download an artifact from Jenkins using the Google Login Plugin?
Viewed 0 times
cantheartifactgooglejenkinsloginpluginusinghowdownload
Problem
I recently spun up a new Jenkins instance and installed the Google Login Plugin for authentication via Google. I would like to download build artifacts to servers using a shell script, basically curl or wget, but cannot authenticate properly from command line.
I tried the following
I also tried the same without
The response is always
I attempted to follow this post but ran into an issue.
I have seen this workaround, but it seems like I'd be adding a security hole.
Does anyone have experience with this plugin or in general just downloading from an OAuth-protected endpoint?
I tried the following
wget command without success.wget --auth-no-challenge --http-user=XXXX --http-password=XXXX https://____/job/_____/lastSuccessfulBuild/artifact/target/ROOT.warI also tried the same without
http-:wget --auth-no-challenge --user=XXXX --password=XXXX https://____/job/_____/lastSuccessfulBuild/artifact/target/ROOT.warThe response is always
401 Invalid password/token for user: XXXXI attempted to follow this post but ran into an issue.
I have seen this workaround, but it seems like I'd be adding a security hole.
Does anyone have experience with this plugin or in general just downloading from an OAuth-protected endpoint?
Solution
Thank you to the comment from user54 for the answer.
Both of my pasted
https://stackoverflow.com/a/34634247/317951
Both of my pasted
wget URLs work as long as I'm using the correct value for password. In this case, I needed to use my user's API Token as described in the answer to another question:https://stackoverflow.com/a/34634247/317951
Context
StackExchange DevOps Q#2309, answer score: 2
Revisions (0)
No revisions yet.