Skip to content

Fix private GitHub release asset downloads - #716

Closed
dbalabka wants to merge 1 commit into
php:1.5.xfrom
dbalabka:fix-private-github-release-assets
Closed

Fix private GitHub release asset downloads#716
dbalabka wants to merge 1 commit into
php:1.5.xfrom
dbalabka:fix-private-github-release-assets

Conversation

@dbalabka

Copy link
Copy Markdown

Summary

  • download GitHub release assets through the authenticated API endpoint
  • request binary asset content with the required Accept header
  • preserve asset filename for archive-type detection

Fixes #715.

Verification

  • vendor/bin/phpunit test/unit/Downloading/GithubPackageReleaseAssetsTest.php test/unit/ComposerIntegration/Listeners/OverrideDownloadUrlInstallListenerTest.php
  • vendor/bin/phpstan analyse --debug src/Downloading/ReleaseAsset.php src/Downloading/PackageReleaseAssets.php src/Downloading/GithubPackageReleaseAssets.php src/ComposerIntegration/Listeners/OverrideDownloadUrlInstallListener.php test/unit/Downloading/GithubPackageReleaseAssetsTest.php test/unit/ComposerIntegration/Listeners/OverrideDownloadUrlInstallListenerTest.php
  • verified against the reported private release asset with curl and Composer's HttpDownloader

@asgrim asgrim closed this Aug 28, 2026
@asgrim

asgrim commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

@dbalabka as per the label on #715 please do not submit PRs without checking first, this is already being worked on and you have duplicated effort and wasted your own time. In future please read the maintainer's guide, which very clearly states this; additionally, if you had read the PR template you would've seen this also.

@dbalabka

Copy link
Copy Markdown
Author

@asgrim thanks for the quick response and for explaining why the PR was closed.

I made this quick fix in order to move forward with my project. So, I submitted the PR as a draft mainly to demonstrate the cause of the problem and the possible approach to work around it. It is still left to properly pass the autentification token and use proper URL to allow download the asset.

Please feel free to use it as a reference or inspiration if it is useful. There is no concern about duplicated effort on my side. I understand that the maintainers will likely implement a more precise and appropriate fix.

Thanks again for the clarification.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can not download binaries from private repositories

2 participants