Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71569
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <python-python-list@m.gmane.org> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.005 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'debug': 0.07; 'http': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:skip:a 10': 0.09; '(note:': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'request)': 0.16; 'username.': 0.16; 'appropriate': 0.16; 'trying': 0.19; 'machine': 0.22; 'header:User-Agent:1': 0.23; 'header': 0.24; 'login': 0.25; 'second': 0.26; 'pass': 0.26; 'header:X-Complaints-To:1': 0.27; 'host': 0.29; 'correct': 0.29; 'correctly.': 0.31; 'skip:q 20': 0.31; 'writes:': 0.31; 'file': 0.32; 'subject:with': 0.35; 'connection': 0.35; 'created': 0.35; 'hi,': 0.36; 'should': 0.36; 'being': 0.38; 'message-id:@gmail.com': 0.38; 'to:addr:python- list': 0.38; 'sure': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'read': 0.60; 'establish': 0.61; 'name': 0.63; 'saw': 0.77; 'received:89': 0.85 |
| X-Injected-Via-Gmane | http://gmane.org/ |
| To | python-list@python.org |
| From | Akira Li <4kir4.1i@gmail.com> |
| Subject | Re: httplib with NETRC authentication |
| Date | Wed, 14 May 2014 20:47:22 +0400 |
| References | <a432c9a5-ac1e-4e83-8fb8-010e107846b3@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| X-Gmane-NNTP-Posting-Host | 89.169.229.68 |
| User-Agent | Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
| Cancel-Lock | sha1:xF0JCiCC3MopYrFruXJ8N12BC/I= |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10014.1400086056.18130.python-list@python.org> (permalink) |
| Lines | 19 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1400086056 news.xs4all.nl 2941 [2001:888:2000:d::a6]:49580 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:71569 |
Show key headers only | View raw
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