From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.help Subject: Re: authentification with url-retrieve Date: Thu, 15 Jan 2009 11:34:43 -0600 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <861vv4lbgs.fsf@lifelogs.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232041576 1897 80.91.229.12 (15 Jan 2009 17:46:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 17:46:16 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 15 18:47:28 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LNWJ8-0003k6-45 for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 18:47:06 +0100 Original-Received: from localhost ([127.0.0.1]:47101 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNWHr-0002wv-G1 for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 12:45:47 -0500 Original-Path: news.stanford.edu!headwall.stanford.edu!news.glorb.com!news2.glorb.com!feeder.erje.net!newsfeed.straub-nv.de!news.albasani.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-X-Trace: news.albasani.net A64tBaCd3vklUZdck6f+peGW6629OC+H3sO8lw+sP4FuwDcITIzkgYIjVqjN3NByz/mjKnJSAVYKRWt3dtu9zwUb8QGwiP4LY5ZiwOPYAKgWcpu7JMSbY/92xnjk1ZgA Original-X-Complaints-To: abuse@albasani.net Original-NNTP-Posting-Date: Thu, 15 Jan 2009 17:33:47 +0000 (UTC) X-User-ID: buylYZuHYqg1/COHGQnVHd6VE/Ha5Yu7o6hG1mzF1k4= X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Cancel-Lock: sha1:On3Mt2zksIOvohjc1COAx8xiCT8= sha1:7rdzjINDfFavbRZ9nBaOHBNz6fQ= User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux) X-NNTP-Posting-Host: tw8DVp6o5d0uZkiEKd6sq0UTYnSas5+t7KIfzJHmjaE= Original-Xref: news.stanford.edu gnu.emacs.help:166043 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:61365 Archived-At: On Thu, 15 Jan 2009 10:39:19 +0100 Thierry Volpiatto wrote: TV> Is some body knowing how to pass login and password to TV> url-retrieve/synchronously when doing an https request? TV> (without prompt) TV> url-auth.el is not very well documented. Through auth-source you can do: (from the comments section, to be put into the manual eventually) ;; Easy setup: ;; (require 'auth-source) ;; (customize-variable 'auth-sources) ;; optional ;; now, whatever sources you've defined for password have to be available ;; if you want encrypted sources, which is strongly recommended, do ;; (require 'epa-file) ;; (epa-file-mode) ;; (setq epa-file-cache-passphrase-for-symmetric-encryption t) ; VERY important ;; before you put some data in ~/.authinfo.gpg (the default place) ;;; For url-auth authentication (HTTP/HTTPS), you need to use: ;;; machine yourmachine.com:80 port http login testuser password testpass ;;; This will match any realm and authentication method (basic or ;;; digest). If you want finer controls, explore the url-auth source ;;; code and variables. I would recommend just this for auth-sources: (setq auth-sources ((:source "~/.authinfo.gpg" :host t :protocol t))) Let me know if this works for you. The idea of auth-sources is so you don't have to customize 20 places with user names and passwords, so it works for things like Gnus passwords and Tramp as well. Ted