On systems with a git version too old to support the GIT_SSH_COMMAND, a git wrapper script is created in the default temp directory. If that filesystem is mounted noexec, git is unable to execute the wrapper script:
Error: Execution of 'git clone git@github.com:org/repo.git /repo_dir' returned 128: Cloning into '/repo_dir'...
fatal: cannot exec '/tmp/git-helper20230607-525-1fvzyp1': Permission denied
On systems with a git version too old to support the
GIT_SSH_COMMAND
, a git wrapper script is created in the default temp directory. If that filesystem is mountednoexec
, git is unable to execute the wrapper script:This was solved in https://github.com/puppetlabs/puppetlabs-vcsrepo/commit/7f97a76f4682a7c1d5bfbbc3cd5a6dd9523b1d96 by using the Puppet
statedir
instead of the default temp directory, but this was later reverted in https://github.com/puppetlabs/puppetlabs-vcsrepo/commit/684200247c33e42f095f9478033b1d2a50bbbab0.This PR enables specifying the directory used for the wrapper script.