Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/VCS/Adapter/Git.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ abstract public function createWebhook(string $owner, string $repositoryName, st
*/
abstract public function createTag(string $owner, string $repositoryName, string $tagName, string $target, string $message = ''): array;

/** Whether the archive url reaches a private repository on its own. */
public function supportsAuthenticatedArchiveUrl(): bool
{
return true;
}

/**
* Get a short-lived URL to download the repository archive.
*
Expand Down
9 changes: 9 additions & 0 deletions src/VCS/Adapter/Git/Bitbucket.php
Original file line number Diff line number Diff line change
Expand Up @@ -1413,6 +1413,15 @@ private function authenticatedBitbucketUrl(): string
return str_replace('://', '://' . $userinfo . '@', $this->bitbucketUrl);
}

/**
* The archive host answers a token in the url with a redirect to a login
* page. The git endpoint accepts the same token.
*/
public function supportsAuthenticatedArchiveUrl(): bool
{
return false;
}

/**
* @link https://support.atlassian.com/bitbucket-cloud/kb/how-to-download-repositories-using-the-api/
*
Expand Down
Loading