BUILD-4733: Use the correct url format for cloning with an access token

This commit is contained in:
tomverin 2024-07-04 16:05:28 +02:00 committed by GitHub
parent 8a20fdca5e
commit 72febdb507
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -155,7 +155,7 @@ def checkout_repo(repo):
git_url=f"https://github.com/SonarSource/{repo}" git_url=f"https://github.com/SonarSource/{repo}"
token=os.getenv('GITHUB_TOKEN') token=os.getenv('GITHUB_TOKEN')
if token: if token:
git_url=f"https://{token}:x-oauth-basic@github.com/SonarSource/{repo}" git_url=f"https://oauth2:${token}@github.com/SonarSource/{repo}"
if not os.path.exists(repo): if not os.path.exists(repo):
return Repo.clone_from(git_url, repo) return Repo.clone_from(git_url, repo)
else: else: