From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thierry Volpiatto Newsgroups: gmane.emacs.help Subject: Re: authentification with url-retrieve Date: Thu, 15 Jan 2009 20:07:54 +0100 Message-ID: <874p002xrp.fsf@tux.homenetwork> References: <861vv4lbgs.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232046979 22542 80.91.229.12 (15 Jan 2009 19:16:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 15 Jan 2009 19:16:19 +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 20:17:32 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 1LNXib-0000CU-TF for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 20:17:30 +0100 Original-Received: from localhost ([127.0.0.1]:47458 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNXhJ-0006zj-0j for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jan 2009 14:16:09 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNXfg-0005d4-Et for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 14:14:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNXfe-0005bn-NV for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 14:14:27 -0500 Original-Received: from [199.232.76.173] (port=52500 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNXfe-0005bf-K8 for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 14:14:26 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:40084 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LNXfe-0001EC-5D for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 14:14:26 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LNXfX-0005K0-Fk for help-gnu-emacs@gnu.org; Thu, 15 Jan 2009 19:14:19 +0000 Original-Received: from 74.77.197-77.rev.gaoland.net ([77.197.77.74]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Jan 2009 19:14:19 +0000 Original-Received: from thierry.volpiatto by 74.77.197-77.rev.gaoland.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 15 Jan 2009 19:14:19 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 52 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 74.77.197-77.rev.gaoland.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) Cancel-Lock: sha1:xZQzePlefdagAVQG/qlgoCmisI4= X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) 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:61376 Archived-At: Hi Ted! Thank you very much for your precious indications. I will try that tomorrow and tell you how it worked. Ted Zlatanov writes: > 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 > -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France