From 23124c25ed12cfcb33d70f5ea8342779931fff6c Mon Sep 17 00:00:00 2001 From: rakeshgm Date: Wed, 13 May 2020 23:29:29 +0530 Subject: [PATCH] adding git_ignore_ssl task Signed-off-by: rakeshgm --- teuthology/task/internal/git_ignore_ssl.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 teuthology/task/internal/git_ignore_ssl.py diff --git a/teuthology/task/internal/git_ignore_ssl.py b/teuthology/task/internal/git_ignore_ssl.py new file mode 100644 index 000000000..b7bfa3ade --- /dev/null +++ b/teuthology/task/internal/git_ignore_ssl.py @@ -0,0 +1,22 @@ +import contextlib +import logging + +from teuthology.orchestra import run + +log = logging.getLogger(__name__) + + +@contextlib.contextmanager +def git_ignore_ssl(ctx, config): + """ + Ignore ssl error's while cloning from untrusted http + """ + + log.info("ignoring ssl errors while cloning http repo") + ctx.cluster.run( + args=[ + 'sudo', 'git', 'config', run.Raw('--system'), + 'http.sslverify', 'false' + ], + ) + yield -- 2.47.3