{"thread":{"id":"2732","subject":"Re: How can I specify a non-standard TCP port for a git+ssh connection?","startedAt":"2005-12-02T19:31:01Z","lastAt":"2005-12-03T21:43:36Z","messageCount":4,"participants":["linux@horizon.com","Andreas Jochens","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"13111","messageId":"20051202193101.29853.qmail@science.horizon.com","threadId":"2732","inReplyTo":null,"subject":"Re: How can I specify a non-standard TCP port for a git+ssh connection?","fromName":"","fromEmail":"linux@horizon.com","sentAt":"2005-12-02T19:31:01Z","receivedAt":"2005-12-02T19:31:01Z","isPatch":false,"sender":{"key":"linux@horizon.com","avatar":null},"body":"Actually, you don't need any git support.  ssh allows you to set up\n\"virtual hosts\" with any combination of options you like.\n\nHost <virtual>\n        HostName <physical>\n\tPort <nonstandard>\n        User <whoever>\n        IdentityFile    <custom>\n        ForwardAgent    no\n\nSo typing \"ssh <virtual>\" will have the effect of\nssh <whoever>@<physical> -p <nonstandard> -i <custom> -a\n\nQuite often, you let <virtual> == <physical>, so it's \"custom settings\nfor talking to this host\", but you can have multiple different virtual\nnames that all map to the same physical host.\n\nBut the point is that as long as you can pass a hostname through to ssh,\nyou can carry as many custom settings as you like with it.\n"},{"id":"13136","messageId":"20051203080620.GA22032@andaco.de","threadId":"2732","inReplyTo":"20051202193101.29853.qmail@science.horizon.com","subject":"Re: How can I specify a non-standard TCP port for a git+ssh connection?","fromName":"Andreas Jochens","fromEmail":"aj@andaco.de","sentAt":"2005-12-03T08:06:20Z","receivedAt":"2005-12-03T08:06:20Z","isPatch":false,"sender":{"key":"aj@andaco.de","avatar":null},"body":"On 05-Dec-02 14:31, linux@horizon.com wrote:\n> Actually, you don't need any git support.  ssh allows you to set up\n> \"virtual hosts\" with any combination of options you like.\n\n> So typing \"ssh <virtual>\" will have the effect of\n> ssh <whoever>@<physical> -p <nonstandard> -i <custom> -a\n\nThis is a nice feature, of course. But I still have to edit a separate \nconfig file. In some cases (e.g. scripts using ad hoc port forwarding) it \nwould be much easier if the non-standard port and maybe some other\noptions could be specified directly on the git command line or \nin .git/branches.\n\nRegards\nAndreas Jochens\n"},{"id":"13147","messageId":"7vwtimxait.fsf@assigned-by-dhcp.cox.net","threadId":"2732","inReplyTo":"20051203080620.GA22032@andaco.de","subject":"Re: How can I specify a non-standard TCP port for a git+ssh connection?","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-12-03T19:09:46Z","receivedAt":"2005-12-03T19:09:46Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andreas Jochens <aj@andaco.de> writes:\n\n> This is a nice feature, of course. But I still have to edit a separate \n> config file. In some cases (e.g. scripts using ad hoc port forwarding) it \n> would be much easier if the non-standard port and maybe some other\n> options could be specified directly on the git command line or \n\nHaving something on the command line to make it easy to override\none-shot you might be able to talk me into, but not in a config\nfile for git; there is a standard place to hold ssh\nconfiguration already.\n"},{"id":"13159","messageId":"20051203214336.GA32003@andaco.de","threadId":"2732","inReplyTo":"7vwtimxait.fsf@assigned-by-dhcp.cox.net","subject":"Re: How can I specify a non-standard TCP port for a git+ssh connection?","fromName":"Andreas Jochens","fromEmail":"aj@andaco.de","sentAt":"2005-12-03T21:43:36Z","receivedAt":"2005-12-03T21:43:36Z","isPatch":false,"sender":{"key":"aj@andaco.de","avatar":null},"body":"On 05-Dec-03 11:09, Junio C Hamano wrote:\n> Having something on the command line to make it easy to override\n> one-shot you might be able to talk me into, but not in a config\n> file for git; there is a standard place to hold ssh\n> configuration already.\n\nYou are right, a duplication of ssh config file options in git \nconfig files should not be necessary.\n\nA way to specify a non-standard port for ssh on the command line\nwould be sufficient. It is possible to specify non-standard\nports for the git, http and rsync protocols on the command line.\nWhy not for ssh?\n\nRegards\nAndreas Jochens\n"}]}