Try to fix git clones with new security feature.
authorCarl Hetherington <cth@carlh.net>
Thu, 15 Dec 2022 19:11:36 +0000 (19:11 +0000)
committerCarl Hetherington <cth@carlh.net>
Thu, 15 Dec 2022 19:11:36 +0000 (19:11 +0000)
cdist

diff --git a/cdist b/cdist
index 0e1df9f7c9abf6d3942daa4aad6ac7516ed75b1b..36d3bb5408fb3d076fbb75b8e16d5c77126e0d53 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -1017,7 +1017,7 @@ class Tree(object):
                 ref = '--reference-if-able %s/%s.git' % (config.get('git_reference'), self.name)
             else:
                 ref = ''
-            command('git clone %s %s %s/%s.git %s/src/%s' % (flags, ref, config.get('git_prefix'), self.name, target.directory, self.name))
+            command('git -c protocol.file.allow=always clone %s %s %s/%s.git %s/src/%s' % (flags, ref, config.get('git_prefix'), self.name, target.directory, self.name))
             os.chdir('%s/src/%s' % (target.directory, self.name))
 
             if self.commit_ish is not None: