Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] git-send-email: add ~/.authinfo parsing

From: Ted Zlatanov <hidden>
Date: 2016-06-15 22:56:04

On Wed, 06 Feb 2013 14:26:46 +0100 Michal Nazarewicz [off-list ref] wrote: 

MN> On Wed, Feb 06 2013, Junio C Hamano [off-list ref] wrote:
quoted
I see a lot of rerolls on the credential helper front, but is there
anybody working on hooking send-email to the credential framework?
MN> I assumed someone had, but if not I can take a stab at it.  I'm not sure
MN> however how should I map server, server-port, and user to credential
MN> key-value pairs.  I'm leaning towards

MN> 	protocol=smtp
MN> 	host=<smtp-server>:<smtp-port>
MN> 	user=<user>

MN> and than netrc/authinfo helper splitting host to host name and port
MN> number, unless port is not in host in which case protocol is assumed as
MN> port.

That would work (with my PATCHv6 of the netrc credential helper) as
follows:

1) just host

host=H

maps to

machine H login Y password Z

2) host + protocol smtp

host=H
protocol=smtp

maps to any of:

machine H port smtp login Y password Z
machine H protocol smtp login Y password Z

3) host:port + protocol smtp

host=H:25
protocol=smtp

maps to any of:

machine H port 25 protocol smtp login Y password Z
machine H:25 port smtp login Y password Z
machine H:25 protocol smtp login Y password Z

That's my understanding of what we discussed with Peff and Junio about
token mapping.  Note we don't split the input host, but instead say "if
token 'port' is numeric, append it to the host token" on the netrc side.

Does that sound reasonable?  If yes, I can add it to the testing
Makefile for the netrc credential helper, to make sure it's clearly
stated and tested.

Ted
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help