From: rakeshgm Date: Wed, 13 May 2020 17:59:29 +0000 (+0530) Subject: adding git_ignore_ssl task X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fheads%2Fwip-rh-internal-tasks;p=teuthology.git adding git_ignore_ssl task Signed-off-by: rakeshgm --- 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