Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71569
| From | Akira Li <4kir4.1i@gmail.com> |
|---|---|
| Subject | Re: httplib with NETRC authentication |
| Date | 2014-05-14 20:47 +0400 |
| References | <a432c9a5-ac1e-4e83-8fb8-010e107846b3@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10014.1400086056.18130.python-list@python.org> (permalink) |
pratibha natani <en.pratibha@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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
httplib with NETRC authentication pratibha natani <en.pratibha@gmail.com> - 2014-05-13 16:33 -0700 Re: httplib with NETRC authentication Chris Angelico <rosuav@gmail.com> - 2014-05-14 10:11 +1000 Re: httplib with NETRC authentication Akira Li <4kir4.1i@gmail.com> - 2014-05-14 19:44 +0400 Re: httplib with NETRC authentication Akira Li <4kir4.1i@gmail.com> - 2014-05-14 20:47 +0400 Re: httplib with NETRC authentication Chris Angelico <rosuav@gmail.com> - 2014-05-15 03:03 +1000
csiph-web