On Mon, 4 Feb 2013 15:10:40 -0500 Jeff King [off-list ref] wrote:
JK> Technically you can speak a particular protocol on an alternate port:
JK> https://example.com:31337/repo.git
JK> In this case, git will send you the host as:
JK> example.com:31337
JK> You might want to map this to "port" in .autoinfo separately if it's
JK> available.
That would create the following possibilities:
* host example.com:31337, protocol https
* host example.com:31337, protocol unspecified
* host example.com, protocol https
* host example.com, protocol unspecified
How would you like each one to be handled? My preference would be to
make the user say "host example.com:31337" in the netrc file (the
current situation); that's what we do in Emacs and it lets applications
request credentials for a logical service no matter what the port is.
It means that example.com credentials won't be used for
example.com:31337. In practice, that has not been a problem for us.
Ted
On Mon, Feb 04, 2013 at 03:28:52PM -0500, Ted Zlatanov wrote:
JK> You might want to map this to "port" in .autoinfo separately if it's
JK> available.
That would create the following possibilities:
* host example.com:31337, protocol https
* host example.com:31337, protocol unspecified
* host example.com, protocol https
* host example.com, protocol unspecified
Possibilities for .netrc, or for git? Git will always specify the
protocol.
How would you like each one to be handled? My preference would be to
make the user say "host example.com:31337" in the netrc file (the
current situation); that's what we do in Emacs and it lets applications
request credentials for a logical service no matter what the port is.
It means that example.com credentials won't be used for
example.com:31337. In practice, that has not been a problem for us.
Yeah, I think that is a good thing. The credentials used for
example.com:31337 are not necessarily the same as for the main site.
It's less convenient, but a more secure default.
What I was more wondering (and I know very little about .netrc, so this
might not be a possibility at all) is a line like:
host example.com port 5001 protocol https username foo password bar
To match git's representation on a token-by-token basis, you would have
to either split out git's "host:port" pair, or combine the .netrc's
representation to "example.com:5001".
-Peff