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: Fri, 16 Jan 2009 10:21:47 +0100 Message-ID: <874ozz1u8k.fsf@tux.homenetwork> References: <861vv4lbgs.fsf@lifelogs.com> <874p002xrp.fsf@tux.homenetwork> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1232098174 2724 80.91.229.12 (16 Jan 2009 09:29:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 16 Jan 2009 09:29:34 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 16 10:30:46 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 1LNl2L-00041Z-Tw for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jan 2009 10:30:46 +0100 Original-Received: from localhost ([127.0.0.1]:42564 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNl15-00034d-97 for geh-help-gnu-emacs@m.gmane.org; Fri, 16 Jan 2009 04:29:27 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LNkzz-0002TU-PW for help-gnu-emacs@gnu.org; Fri, 16 Jan 2009 04:28:19 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LNkzy-0002Sh-JI for help-gnu-emacs@gnu.org; Fri, 16 Jan 2009 04:28:18 -0500 Original-Received: from [199.232.76.173] (port=49330 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LNkzy-0002Sa-Ah for help-gnu-emacs@gnu.org; Fri, 16 Jan 2009 04:28:18 -0500 Original-Received: from main.gmane.org ([80.91.229.2]:47622 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 1LNkzx-0001pC-UR for help-gnu-emacs@gnu.org; Fri, 16 Jan 2009 04:28:18 -0500 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LNkzw-0004SG-VT for help-gnu-emacs@gnu.org; Fri, 16 Jan 2009 09:28:16 +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 ; Fri, 16 Jan 2009 09:28:16 +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 ; Fri, 16 Jan 2009 09:28:16 +0000 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 84 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:0Agrh5D5LwasphE+hFaHffI0SDE= 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:61397 Archived-At: Hi Ted and all, Thierry Volpiatto writes: > 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) (epa-file-mode) seem to be deprecated, i have here (epa-file-enable). >> ;; (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 Here the line i use for https: ,---- | machine api.del.icio.us:443 port https login xxx password xxxx `---- >> ;;; 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))) ,---- | (setq auth-sources '((:source "~/.authinfo.gpg" :host t :protocol t))) `---- and without encryption (don't encrypt .authinfo): ,---- | (setq auth-sources '((:source "~/.authinfo" :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. i tried auth-sources and it worked fine. :) Thank you. I use actually wget and curl to retrieve https url, i think i will use url-retrieve in next version of anything-delicious.el, even for deleting and renaming bookmarks. When i use encryption, (epa settings) i am prompt two times for passphrase, is it normal? -- A + Thierry Volpiatto Location: Saint-Cyr-Sur-Mer - France