HomeSoftware Heritage

Replace temporary ssh wrapper with -o opts

Description

Replace temporary ssh wrapper with -o opts

If you use identity, at present a shell script to wrap ssh was
written out (to the Puppet state dir) then git told to use it by
pointing the GIT_SSH env var at it.

That failed after my changes to run git as the user requested, because
the user probably doesn't have access to the script in the Puppet state
dir.

The script is unnecessary IMO, anyway - setting the options it sets can
just as easily be done by -o options in the GIT_SSH_COMMAND env var,
which is what I've done here.

Note that I have intentionally not included the disabling of
StrictHostKeyChecking which was present in the wrapper script, as I do
not think that intentionally reducing someone's security without being
asked to do so is a good idea. Similarly I left out setting the
timeout, as that isn't related to being asked to use a given identity
key. (It may well be that there should be a new ssh_opts attribute
you can set on a Vcsrepo resource to pass options along, perhaps, but I
think that's outside the scope of what I'm trying to fix here.)

Details

Provenance
David Precious <david.precious@kaarbontech.co.uk>Authored on Nov 18 2020, 9:05 PM
Daniel Carabas <daniel.carabas@puppet.com>Committed on Feb 22 2021, 11:16 AM
olasdPushed on Dec 28 2021, 10:47 AM
Parents
R119:8786fe0e19ed: Always run as given user, even if identity set
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Carabas <daniel.carabas@puppet.com> committed R119:98cb96faa8fc: Replace temporary ssh wrapper with -o opts (authored by David Precious <david.precious@kaarbontech.co.uk>).Feb 22 2021, 11:16 AM