Downloading build files from Jenkins
<p>I have list of builds in Jenkins in URL</p>

<pre><code>http://&lt;hostname&gt;/ci/view/XX-CI/job/XX-2%20UI%20Demo/ws/build/dist/
</code></pre>

<p>The Jenkins needs a login and it is authenticated using Google accounts. </p>

<p>I am trying a simple python script using Requests to looks for latest files in the build location and download the same.</p>

<p>To look for latest files, I wrote a simple python script as follows. My idea is to get a HTML response and parse the html response to get the latest build filename and download the same.</p>

<pre><code>#!/usr/bin/python

import requests

resp = requests.get('http://&lt;hostname&gt;/ci/view/XX-CI/job/XX-2%20UI%20Demo/ws/build/dist/', auth=('username', 'pass')) 
print rep.text
</code></pre>

<p>I got something like below as output</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta name="robots" content="noindex"&gt;
  &lt;title&gt;Sign in - Google Accounts&lt;/title&gt;
  &lt;meta http-equiv="refresh" content="1; url=https://www.google.com/accounts/AccountChooser?hd=accedo.tv&amp;amp;
</code></pre>

<p>It means my authentication details which I passed in the script is not successful.</p>

<p>Does google accounts cannot be authenticated this way? Is there a better approach?</p>