From 89974c3363a3f8467e471aa0bf78ea65e6e03929 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 22 Apr 2014 12:57:25 +0000 Subject: Only set GIT_SSL_NO_VERIFY on specific git invocations --- lorry | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lorry b/lorry index 509f0fb..853c65d 100755 --- a/lorry +++ b/lorry @@ -301,7 +301,8 @@ class Lorry(cliapp.Application): def mirror_git(self, project_name, dirname, gitdir, spec): # Turn off git's SSL/TLS certificate verification, until Baserock # has an CA management infrastructure. - os.environ['GIT_SSL_NO_VERIFY'] = 'true' + env = dict(os.environ) + env['GIT_SSL_NO_VERIFY'] = 'true' if not os.path.exists(gitdir): self.progress('.. initialising git dir') @@ -321,12 +322,12 @@ class Lorry(cliapp.Application): '+refs/tags/*:refs/tags/*'], cwd=gitdir) try: self.run_program(['git', 'remote', 'update', 'origin', '--prune'], - cwd=gitdir) + cwd=gitdir, env=env) except: self.run_program(['git', 'remote', 'prune', 'origin'], - cwd=gitdir) + cwd=gitdir, env=env) self.run_program(['git', 'remote', 'update', 'origin', '--prune'], - cwd=gitdir) + cwd=gitdir, env=env) def gitify_bzr(self, project_name, dirname, gitdir, spec): bzrdir = os.path.join(dirname, 'bzr') -- cgit v1.2.1