httplib with NETRC authentication
Akira Li
4kir4.1i at gmail.com
Wed May 14 12:47:22 EDT 2014
pratibha natani <en.pratibha at gmail.com> writes:
> Hi,
>
> I am trying to establish http connection to a gerrit host using netrc authentication. I have a netrc file created with following entries:
> machine host1.com login name password pass
>
> I did a debug and saw that my netrc file is being read correctly. Also in the connection object(after sending request) a header got created with appropriate credentials:
> 'headers': {'Authorization': 'Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ='}
>
It should be QWxhZGRpbjpvcGVuIHNlc2FtZQ== (note: the second '=')
Also, make sure that you use the correct case for the username. Userids
might be case sensitive.
--
akira
More information about the Python-list
mailing list