I have read this and this question. In both they say Emacs can deal with authentication, but it does not work for me.
The question is: What is wrong?
The Emacs version is 24.0.97-1, and it is running on 64-bit Linux.
At work I have to use proxy server for any Internet connection. So I set the following environment variables:
http_proxy="http://username:password@ip:port"
https_proxy="https://username:password@ip:port"
ftp_proxy="ftp://username:password@ip:port"
This works and I can download packages without any problem.
When I run M-x package-refresh-contents
in Emacs it asks me for login and password for the proxy server, but it can not connect to the server. It even does not try to connect, i.e. after I type password and press Enter
Emacs instantly reports:
Failed to download 'marmalade' archive
The same happens if I remove username and password from http_proxy
variable or if I set url-proxy-services
in Emacs (even if I unset the system variable).