Skip to content

Commit 28136be

Browse files
authored
fix clone bitbucket with access token (#280)
1 parent dd93b2d commit 28136be

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

api/data_pipeline.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,9 @@ def download_repo(repo_url: str, local_path: str, type: str = "github", access_t
9999
# Format: https://oauth2:{token}@gitlab.com/owner/repo.git
100100
clone_url = urlunparse((parsed.scheme, f"oauth2:{access_token}@{parsed.netloc}", parsed.path, '', '', ''))
101101
elif type == "bitbucket":
102-
# Format: https://{token}@bitbucket.org/owner/repo.git
103-
clone_url = urlunparse((parsed.scheme, f"{access_token}@{parsed.netloc}", parsed.path, '', '', ''))
102+
# Format: https://x-token-auth:{token}@bitbucket.org/owner/repo.git
103+
clone_url = urlunparse((parsed.scheme, f"x-token-auth:{access_token}@{parsed.netloc}", parsed.path, '', '', ''))
104+
104105
logger.info("Using access token for authentication")
105106

106107
# Clone the repository

0 commit comments

Comments
 (0)