Programmatic download of build artifacts

Hi, as part of our install, I am trying to write a script (this case is Python, but that doesn't matter) to pull down artifacts for install.

I have the URL correct, and I've tried setting the necessary user/passwd auths, but no matter what I do I get redirected to the login page.  I'm guessing this is because my script doesn't deal with cookies.  Are cookies really necessary for the repository?  Any way I can turn that requirement off?



Comment actions Permalink

Cookies are not required. I guess your script does not send authentication parameters and instead waits for server to ask for authentication. Server shows login page because it does not know what client is communicating with it (browser or your script).

I do not know what library do you use to access server, but sometimes there are settings allowing to send authentication headers with GET request (i.e. be preemptive for authentication).If this can't be done then you should add /httpAuth/ prefix to the path of your download URL. In this case server will not redirect to login page but instead will ask for HTTP basic authentication.

Comment actions Permalink

Thanks, prepending /httpAuth did the trick.


Please sign in to leave a comment.