How can I download an artifact from Jenkins using the Google Login Plugin? 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 wget command without success.

wget --auth-no-challenge --http-user=XXXX --http-password=XXXX https://____/job/_____/lastSuccessfulBuild/artifact/target/ROOT.war


I also tried the same without http-:

wget --auth-no-challenge --user=XXXX --password=XXXX https://____/job/_____/lastSuccessfulBuild/artifact/target/ROOT.war


The response is always

401 Invalid password/token for user: XXXX


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?
Thank you to the comment from user54 for the answer.

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