From: Aaron Hall <aaronchallmba@gmail.com>
To: git@vger.kernel.org
Subject: Re: Default ssh command
Date: Tue, 6 Jul 2021 22:13:34 -0400 [thread overview]
Message-ID: <CADrEZfEVbtbovTbFM2BEuK_cWp4jcV3CZyrzasvsvFbuu1rmWg@mail.gmail.com> (raw)
In-Reply-To: <CADrEZfHJZT47nNZJ8v2T4vOJkMN7ccaai6DKdzFLF8Zoc42hWw@mail.gmail.com>
> When we use ssh to run the receive-pack over the wire while pushing,
> we do not ask for pty, and because the "-e" option to set the escape
> character is meaningful only when ssh runs with pty allocated, you
> shouldn't have to do this, unless you force pty allocation by
> e.g. passing "-t" yourself.
Then I wonder why I'm getting a pseudoterminal.
Note that I'm using git from git bash on Windows in a walled off
corporate environment.
The ssh manpage says:
> If no pseudo-terminal has been allocated, the session is transparent
> and can be used to reliably transfer binary data. On most
> systems, setting the escape character to ``none'' will also
> make the session transparent even if a tty is used.
If we want the ssh to be binary transparent regardless
(and I think we do) then that makes my suggestion,
`ssh -e none`, still perhaps a good one?
On Tue, Jul 6, 2021 at 10:03 PM Aaron Hall <aaronchallmba@gmail.com> wrote:
>
> I'll reply on list.
>
> On Tue, Jul 6, 2021 at 9:58 PM Aaron Hall <aaronchallmba@gmail.com> wrote:
> >
> > My context is using git from git bash on Windows in a walled off environment.
> >
> > On Tue, Jul 6, 2021 at 9:48 PM Junio C Hamano <gitster@pobox.com> wrote:
> > >
> > > Aaron Hall <aaronchallmba@gmail.com> writes:
> > >
> > > > I was trying to push some binary files (PNGs) over ssh and found some
> > > > files inexplicably wouldn't successfully push.
> > > >
> > > > I set, in my .gitconfig file:
> > > >
> > > > [core]
> > > > sshCommand = ssh -e none
> > > >
> > > > And it works now for all files (that I can tell).
> > > >
> > > > From a close examination of the output where I noted escape codes
> > > > showing up, I believe the problem to be ssh escape codes.
> > > >
> > > > `\n~.` for example closes the ssh client.
> > > >
> > > > Therefore I think the default ssh command should be `ssh -e none`
> > > > instead of `ssh` for the benefit of users who won't recognize the
> > > > problem, unless `git` is expected to make use of ssh escape codes.
> > >
> > > Curious.
> > >
> > > When we use ssh to run the receive-pack over the wire while pushing,
> > > we do not ask for pty, and because the "-e" option to set the escape
> > > character is meaningful only when ssh runs with pty allocated, you
> > > shouldn't have to do this, unless you force pty allocation by
> > > e.g. passing "-t" yourself.
next prev parent reply other threads:[~2021-07-07 2:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 1:35 Default ssh command Aaron Hall
2021-07-07 1:48 ` Junio C Hamano
[not found] ` <CADrEZfGHAi=Lr6QMsJbXGy1Rs9VDzTVxQPNH4xHHj6ataEAvVA@mail.gmail.com>
[not found] ` <CADrEZfHJZT47nNZJ8v2T4vOJkMN7ccaai6DKdzFLF8Zoc42hWw@mail.gmail.com>
2021-07-07 2:13 ` Aaron Hall [this message]
2021-07-07 13:29 ` brian m. carlson
2021-07-08 13:50 ` Aaron Hall
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADrEZfEVbtbovTbFM2BEuK_cWp4jcV3CZyrzasvsvFbuu1rmWg@mail.gmail.com \
--to=aaronchallmba@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).