summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-04-22 12:57:25 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2014-04-22 12:57:25 +0000
commit89974c3363a3f8467e471aa0bf78ea65e6e03929 (patch)
tree994f0723f177eb5ac279b0a0b28beb611963070e
parent1c60a968ff0c678a6e286db95870947b01af0b7b (diff)
downloadlorry-baserock/liw/new-lc-2.tar.gz
Only set GIT_SSL_NO_VERIFY on specific git invocationsbaserock/liw/new-lc-2
-rwxr-xr-xlorry9
1 files 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')