diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-04-22 12:57:25 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2014-04-22 12:57:25 +0000 |
commit | 89974c3363a3f8467e471aa0bf78ea65e6e03929 (patch) | |
tree | 994f0723f177eb5ac279b0a0b28beb611963070e | |
parent | 1c60a968ff0c678a6e286db95870947b01af0b7b (diff) | |
download | lorry-baserock/liw/new-lc-2.tar.gz |
Only set GIT_SSL_NO_VERIFY on specific git invocationsbaserock/liw/new-lc-2
-rwxr-xr-x | lorry | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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') |