YSF
03/22/2023, 9:45 PMtoken = self.bitbucket_credentials.token.get_secret_value() AttributeError: 'NoneType' object has no attribute 'get_secret_value'
does anyone have any ideas? The blocks UI does suggest personal access token is optional. Unless it's 'optional' in case it's a public repoNate
03/23/2023, 4:44 PMdef _create_repo_url(self) -> str:
"""Format the URL provided to the `git clone` command.
For private repos:
<https://x-token-auth>:<access-token>@bitbucket.org/<user>/<repo>.git
All other repos should be the same as `self.repository`.
"""
url_components = urlparse(self.repository)
if url_components.scheme == "https" and self.bitbucket_credentials is not None:
token = self.bitbucket_credentials.token.get_secret_value()
updated_components = url_components._replace(
netloc=f"x-token-auth:{token}@{url_components.netloc}"
)
full_url = urlunparse(updated_components)
else:
full_url = self.repository
return full_url
YSF
03/24/2023, 4:36 AM