composer / satis

Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

satis build trying to connect to github

jnaklaas opened this issue · comments

I've deployed several packages with satis, so this worked before.

When building now, I receive this error:

  [UnexpectedValueException]                                          
  Your github oauth token for github.com contains invalid characters 

I do not host any packages on github, they should be pulled from bitbucket. This is my package.json:

{
  "name": "domain/packages",
  "homepage": "https://packages.domain.tld",
  "repositories": [
    { "type": "vcs", "url": "https://bitbucket.org/team/repo-1" },
    { "type": "vcs", "url": "https://bitbucket.org/team/repo-2" },
    { "type": "vcs", "url": "https://bitbucket.org/team/repo-3" },
    { "type": "vcs", "url": "https://bitbucket.org/team/repo-4" },
  ],
  "require" : {
    "domain/repo-1": ">1.0.0-beta.42",
    "domain/repo-2": ">=1.0",
    "domain/repo-3": ">=1.0",
    "domain/repo-4": ">=1.0"
  },
  "archive": {
    "directory": "archives",
    "format": "zip",
    "skip-dev": true
  }
}

This is the command I use to build (which has been working for years):

php bin/satis build ../satis.json ../www

make sure your satis setup uses an up-to-date version of composer in its dependencies (which is the case if you use the locked dependencies of Satis and your Satis setup is up-to-date).

Thanks Christophe. Updating Satis (using composer 2) fixed the issue, but it created a new one. All newly generated zip archives throw errors when composer requiring the package in a project.

$ composer require team/repo-1

./composer.json has been updated
Running composer update team/repo-1
Loading composer repositories with package information
Updating dependencies
Lock file operations: 1 install, 0 updates, 0 removals
  - Locking tricksforbricks/availability (1.1.9)
Writing lock file
  - Downloading team/repo-1 (1.1.9)
  - Installing team/repo-1 (1.1.9): Extracting archive
Failed to extract team/repo-1 (1) '/usr/bin/unzip' -qq '/Users/me/team/projects/myproject/vendor/composer/tmp-299b66adb1f3d03c48961e4d968420414.zip' -d '/Users/me/team/projects/myprojectvendor/composer/6599e0a2'

warning:  stripped absolute path spec from /private/var/folders/21/gnrfrmtx7z72qv4j9cc7psvc0000gn/T/composer_archive613f0b0beb833/composer.lock
# this warning is repeated for every file in the package

The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems)
    Unzip with unzip command failed, falling back to ZipArchive class

After this, the package is unzipped, but all files are inside a nested subdirectory, instead of in the root of the project:
repo-1/var/folders/21/gnrfrmtx7z72qv4j9cc7psvc0000gn/T/composer_archive613f0b0beb833/

So the package is not properly installed and not available in the project. When I require an older version of the package, it unzips and installs as expected: composer require team/repo-1:1.1.7. Seems like a bug in the Satis update? I guess it builds the archive incorrectly?

Probably more a bug in Composer 2, as the logic creating archives comes from Composer itself.

Can't find anything on that bug, no idea where to go from here. I also tried downgrading composer to v1, and use the satis-1.x branch to build my package:

composer selfupdate --1
php bin/satis build ../satis.json ../www

But then I get the [UnexpectedValueException] Your github oauth token for github.com contains invalid characters error again.