From 104b41cfd2772de539aa28feb8a80d79c3bc7cd3 Mon Sep 17 00:00:00 2001 From: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Date: Sat, 16 Mar 2024 20:14:14 +0530 Subject: [PATCH] MINOR: Fix Looker clone repo failure for bitbucket (#15590) * MINOR: Fix Looker clone repo failure for bitbucket * pyformat --- .../src/metadata/ingestion/source/dashboard/looker/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ingestion/src/metadata/ingestion/source/dashboard/looker/utils.py b/ingestion/src/metadata/ingestion/source/dashboard/looker/utils.py index a2e1656992d..6dcf59345df 100644 --- a/ingestion/src/metadata/ingestion/source/dashboard/looker/utils.py +++ b/ingestion/src/metadata/ingestion/source/dashboard/looker/utils.py @@ -54,14 +54,16 @@ def _clone_repo( return url = None + allow_unsafe_protocols = False if isinstance(credential, GitHubCredentials): url = f"https://x-oauth-basic:{credential.token.__root__.get_secret_value()}@github.com/{repo_name}.git" elif isinstance(credential, BitBucketCredentials): url = f"https://x-token-auth::{credential.token.__root__.get_secret_value()}@bitbucket.or/{repo_name}.git" + allow_unsafe_protocols = True assert url is not None - Repo.clone_from(url, path) + Repo.clone_from(url, path, allow_unsafe_protocols=allow_unsafe_protocols) logger.info(f"repo {repo_name} cloned to {path}") except Exception as exc: