Skip to content

Can not download binaries from private repositories #715

Description

@dbalabka

What are you trying to do?
I've a private github repo and binaries for each release. I'm trying to install the extension.

Installation fails with the following exception:

Found prebuilt archive: https://github.com/dbalabka/.../releases/download/0.3.0/php_...-0.3.0_php8.2-x86_64-linux-glibc.zip
Note: dist-sha integrity check is not available for prebuilt-binary URLs; HTTPS to the release-asset origin is the only integrity guarantee.
Selected download URL method: pre-packaged-binary
Package operations: 1 install, 0 updates, 0 removals
Installs: dbalabka/...:0.3.0
  - Downloading dbalabka/... (0.3.0)
Downloading https://github.com/dbalabka/.../releases/download/0.3.0/php_...-0.3.0_php8.2-x86_64-linux-glibc.zip
[404] https://github.com/dbalabka/.../releases/download/0.3.0/php_...-0.3.0_php8.2-x86_64-linux-glibc.zip
    Failed to download dbalabka/...  from dist: The "https://github.com/dbalabka/.../releases/download/0.3.0/php_...-0.3.0_php8.2-x86_64-linux-glibc.zip" file could not be downloaded (HTTP/2 404 )
    Source fallback is disabled. Not trying alternative sources.

In CurlDownloader.php line 686:

  [Composer\Downloader\TransportException (404)]
  The "https://github.com/dbalabka/.../releases/download/0.3.0/php_...-0.3.0_php8.2-x86_64-linux-glibc.zip" file could not be downloaded (HTTP/2 404
  )


Exception trace:
  at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Util/Http/CurlDownloader.php:686
 Composer\Util\Http\CurlDownloader->failResponse() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Util/Http/CurlDownloader.php:481
 Composer\Util\Http\CurlDownloader->tick() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Util/HttpDownloader.php:395
 Composer\Util\HttpDownloader->countActiveJobs() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Util/Loop.php:86
 Composer\Util\Loop->wait() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:434
 Composer\Installer\InstallationManager->waitOnPromises() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:289
 Composer\Installer\InstallationManager->downloadAndExecuteBatch() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer/InstallationManager.php:221
 Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:876
 Composer\Installer->doInstall() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:686
 Composer\Installer->doUpdate() at phar:///usr/local/bin/pie/vendor/composer/composer/src/Composer/Installer.php:325
 Composer\Installer->run() at phar:///usr/local/bin/pie/src/ComposerIntegration/ComposerIntegrationHandler.php:225
 Php\Pie\ComposerIntegration\ComposerIntegrationHandler->runInstall() at phar:///usr/local/bin/pie/src/Command/InstallCommand.php:203
 Php\Pie\Command\InstallCommand->execute() at phar:///usr/local/bin/pie/vendor/symfony/console/Command/Command.php:326
 Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:1121
 Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:324
 Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/pie/vendor/symfony/console/Application.php:175
 Symfony\Component\Console\Application->run() at phar:///usr/local/bin/pie/bin/pie:68
 require() at /usr/local/bin/pie:16

Adding COMPOSER_AUTH env does not help:

export COMPOSER_AUTH="{\"github-oauth\": {\"github.com\": \"$(gh auth token)\"}}"

What platform, and PIE version are you using?
WSL, Ubuntu, PIE nightly

Steps to reproduce the issue

  1. Add binaries to release in private repo
  2. Try to install extension

What do you expect to happen?
It should download the binary. Probably, using the API. See https://github.com/gm3dmo/the-power/blob/main/download-release-asset.sh

What is actually happening
PIE get 404 because request isn't authentificated.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmaintainer investigatingThis ticket is being investigated by maintainers. Please check with us before contributing PRs etc!

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions