Re: ssh username environment variable

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: ssh username environment variable

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:59

"Shawn O. Pearce" [off-list ref] writes:
Chris Packham [off-list ref] wrote:
quoted
Just wondering if there is an environment variable I can use to tell
git or ssh what user name to use for the ssh transport?
No.  But you can hack around it:

  cat >$HOME/bin/git-ssh
  #!/bin/sh
  ssh -l $GIT_SSH_USER "$@"
  ^D

  GIT_SSH=$HOME/bin/git-ssh GIT_SSH_USER=myname git clone ...
I thought the standard answer was "use $HOME/.ssh/config", to set User
by keying on the remote hostname to which you are going.

Re: ssh username environment variable

From: Chris Packham <hidden>
Date: 2016-06-15 22:47:59

On Fri, Jan 8, 2010 at 3:34 PM, Junio C Hamano [off-list ref] wrote:
"Shawn O. Pearce" [off-list ref] writes:
quoted
Chris Packham [off-list ref] wrote:
quoted
Just wondering if there is an environment variable I can use to tell
git or ssh what user name to use for the ssh transport?
No.  But you can hack around it:

  cat >$HOME/bin/git-ssh
  #!/bin/sh
  ssh -l $GIT_SSH_USER "$@"
  ^D

  GIT_SSH=$HOME/bin/git-ssh GIT_SSH_USER=myname git clone ...
I thought the standard answer was "use $HOME/.ssh/config", to set User
by keying on the remote hostname to which you are going.
Yeah thats what I've done after reading a few more man pages.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help