Rally Pyral API Key Proxy Issue

915 views Asked by At

I am trying to replace my old username/password Rally authentication with Rally API Keys.

server, user, password, workspace, proj = rallySettings(options)
rally = Rally(server, user, password)

to

rally = Rally(apikey='SECRET_KEY')

When I made the change, I started getting errors like: ('Cannot connect to proxy.', gaierror(-5, 'No address associated with hostname')).

If I switch back to the old user/password route, it works just fine.

Here's how I am setting the proxy:

proxy = "http://internal.proxy.com:port"
os.environ['HTTPS_PROXY'] = proxy
os.environ['https_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy

I'm using pyral 1.1.1 and requests 2.3.0 on a redhat server. Any ideas why switching from Username/Password to APIKeys would cause a proxy connection issue?

1

There are 1 answers

1
nickm On

ApiKey replaces username/password, but it does not replace host.

This line:

rally = Rally(apikey='SECRET_KEY')

is missing host(server)

See an example here.

if apikey:
        rally = Rally(server, apikey=apikey, workspace=workspace, project=project)
    else:
        rally = Rally(server, user=username, password=password, workspace=workspace, project=project)