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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 06 Feb 2013 14:26:46 +0100 Michal Nazarewicz <mina86@xxxxxxxxxx> wrote: 

MN> On Wed, Feb 06 2013, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]