Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ELPA behind a proxy with username + password: URL package issue?

584 views
Skip to first unread message

Elena

unread,
Jun 30, 2010, 5:27:09 AM6/30/10
to
Hello,

I'm trying to use ELPA behind a proxy which requires authentication.
I've found out that ELPA's connection relies on the URL package, which
prompts me for a username and a password. I'd like to set such
credentials on Emacs startup, and I've found out they should go into
".authinfo" file. I've also found out that you can use an encrypted
".authinfo.gpg". Thus, here is my setup:

auth-sources: ((:source "~/.authinfo.gpg" :host t :protocol t)

Then, content of "~/.authinfo.gpg" is like this:

machine <proxy-address> port <proxy-port> login <my-username> password
<my-password>

These settings are being ignored when using "package-list-packages".
However I'm asked for a password to open "~/.authinfo.gpg".

Any hints? Thanks.

Elena

unread,
Jun 30, 2010, 5:32:59 AM6/30/10
to
I've also tried a different "~/.authinfo.gpg" format as suggested
here:

http://groups.google.com/group/gnu.emacs.help/browse_frm/thread/aab1727dbd0ccdc6/936a97a86b45ffe8?lnk=gst&q=url+proxy+password#936a97a86b45ffe8

That is:

machine <proxy-address>:<proxy-port> port http login <my-username>
password <my-password>

Ted Zlatanov

unread,
Jul 1, 2010, 12:02:45 PM7/1/10
to
On Wed, 30 Jun 2010 02:32:59 -0700 (PDT) Elena <egar...@gmail.com> wrote:

E> I've also tried a different "~/.authinfo.gpg" format as suggested
E> here:

E> http://groups.google.com/group/gnu.emacs.help/browse_frm/thread/aab1727dbd0ccdc6/936a97a86b45ffe8?lnk=gst&q=url+proxy+password#936a97a86b45ffe8

E> That is:

E> machine <proxy-address>:<proxy-port> port http login <my-username>
E> password <my-password>

From (info "(auth)Help for users"):

For url-auth authentication (HTTP/HTTPS), you need to put this in
your netrc file:

machine yourmachine.com:80 port http login testuser password testpass

This will match any realm and authentication method (basic or digest)
over HTTP. HTTPS is set up similarly. If you want finer controls,
explore the url-auth source code and variables.

Please try that. See the auth-source manual (info "(auth)") for more
information.

Ted

Elena

unread,
Jul 14, 2010, 7:53:38 PM7/14/10
to
Thanks, Ted.

I did read the documentation before asking, but only setting the
environment variable "http_proxy" fixed the issue.

0 new messages