Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

satis build trying to connect to github #652

Open
jnaklaas opened this issue May 28, 2021 · 4 comments
Open

satis build trying to connect to github #652

jnaklaas opened this issue May 28, 2021 · 4 comments
Labels

Comments

@jnaklaas
Copy link

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
@jnaklaas jnaklaas added the bug label May 28, 2021
@stof
Copy link
Contributor

stof commented May 28, 2021

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).

@jnaklaas
Copy link
Author

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?

@stof
Copy link
Contributor

stof commented Sep 13, 2021

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

@jnaklaas
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants