git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Sven Strickroth <sven@cs-ware.de>
To: Junio C Hamano <gitster@pobox.com>, git <git@vger.kernel.org>,
	bwilliams.eng@gmail.com
Subject: Git silently broke push-options over ssh?
Date: Fri, 22 Oct 2021 19:27:14 +0200	[thread overview]
Message-ID: <4aef40f2-43f8-eab3-a840-6e76c8b4afbb@cs-ware.de> (raw)

Hi,

I'm using Git (for Windows) 2.33.1 and using push-options as described 
on <https://docs.gitlab.com/ee/user/project/push_options.html> does not 
work any more (IIRC it used to work with Git 2.16 and 2.17).

If I understood 
<https://opensource.googleblog.com/2018/05/introducing-git-protocol-version-2.html> 
correctly I have to enable the Git protocol version 2 and then the push 
options should work.

Now, when I try to use push options on Windows it does not work. I tried 
to debug it:

D:\TortoiseGit>set GIT_TRACE=2
D:\TortoiseGit>set GIT_SSH=ssh.exe
D:\TortoiseGit>set GIT_SSH_VARIANT=ssh
D:\TortoiseGit>set GIT_PROTOCOL=version=2
D:\TortoiseGit>git -c protocol.version=2 -c ssh.variant=ssh -c 
ssh.command=ssh push -v -o ci.skip origin master~23:testing
17:36:06.285346 exec-cmd.c:237          trace: resolved executable dir: 
C:/Program Files/Git/mingw64/bin
17:36:06.285346 git.c:455               trace: built-in: git push -v -o 
ci.skip origin 'master~23:testing'
Pushing to gitlab.com:tortoisegit/tortoisegit.git
17:36:06.295270 run-command.c:666       trace: run_command: unset 
GIT_CONFIG_PARAMETERS GIT_PREFIX; ssh.exe git@gitlab.com 
'git-receive-pack '\''tortoisegit/tortoisegit.git'\'''

As you can see, the "-o SendEnv" parameter not passed to ssh.exe and, 
therefore, I think the push option is not transferred to the server.

According to <https://github.com/git-for-windows/git/issues/3486> the 
reason is a commit that was shipped with Git 2.18 (in 2018):

<https://github.com/git/git/commit/1aa8dded3afff28d8f4c24a97b237a0d9e633173>

How to use push options with Git over SSH?

-- 
Best regards,
  Sven Strickroth
  PGP key id F5A9D4C4 @ any key-server

             reply	other threads:[~2021-10-22 17:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-22 17:27 Sven Strickroth [this message]
2021-10-22 20:53 ` Git silently broke push-options over ssh? Jeff King
2021-10-23 14:57   ` Sven Strickroth

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=4aef40f2-43f8-eab3-a840-6e76c8b4afbb@cs-ware.de \
    --to=sven@cs-ware.de \
    --cc=bwilliams.eng@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).