You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add auth.json to the current project directory by running composer config github-oauth.github.com token123 (doesn't have to be a valid token).
Run the build vendor/bin/satis build -vvv -n satis.json public to produce the build and notice how it doesn't use the configured token:
Checked CA file /opt/homebrew/etc/ca-certificates/cert.pem: valid
Executing command (/path/to/project/satis-example): git branch -a --no-color --no-abbrev -v
Executing command (/path/to/project/satis-example): git describe --exact-match --tags
Executing command (CWD): git --version
Executing command (/path/to/project/satis-example): git log --pretty="%H" -n1 HEAD --no-show-signature
Executing command (/path/to/project/satis-example): hg branch
Executing command (/path/to/project/satis-example): fossil branch list
Executing command (/path/to/project/satis-example): fossil tag list
Executing command (/path/to/project/satis-example): svn info --xml
Failed to initialize global composer: Composer could not find the config file: /Users/kaspars/.composer/composer.json
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
Reading /path/to/project/satis-example/vendor/composer/installed.json
Scanning packages
Downloading https://api.github.com/repos/mycompany/privaterepo
Executing command (CWD): git config github.accesstoken
Executing command (CWD): git clone --mirror -- '[email protected]:mycompany/privaterepo.git' '/Users/kaspars/.composer/cache/vcs/git-github.com-mycompany-privaterepo.git/'
Executing command (CWD): git config github.accesstoken
Executing command (CWD): git --version
Failed to clone the [email protected]:mycompany/privaterepo.git repository, try running in interactive mode so that you can enter your GitHub credentials
In Git.php line 404:
[RuntimeException]
Failed to execute git clone --mirror -- '[email protected]:mycompany/privaterepo.git' '/Users/kaspars/.composer/cache/vcs/git-github.com-mycompany-p
rivaterepo.git/'
Cloning into bare repository '/Users/kaspars/.composer/cache/vcs/git-github.com-mycompany-privaterepo.git'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Outcome
See above ☝️.
The $config->get('home') . '/auth.json' path points to the global Composer home directory so the local project-level auth.json isn't checked.
Expected behavior
Satis uses the auth.json data from the project root directory.
Additional context
None.
The text was updated successfully, but these errors were encountered:
Describe the bug
The documentation states that Satis supports project-level
auth.json
files:satis/docs/using.md
Lines 215 to 217 in 2499574
However, the current source code only supports global
auth.json
and doesn't use the project-levelauth.json
at all:satis/src/Console/Command/BuildCommand.php
Lines 283 to 287 in 2499574
To Reproduce
Create a new project and require satis as a dependency in
composer.json
:Add
satis.json
with a non-existent GitHub project repository (doesn't need to exist for this test):Add
auth.json
to the current project directory by runningcomposer config github-oauth.github.com token123
(doesn't have to be a valid token).Run the build
vendor/bin/satis build -vvv -n satis.json public
to produce the build and notice how it doesn't use the configured token:Outcome
See above ☝️.
The
$config->get('home') . '/auth.json'
path points to the global Composer home directory so the local project-levelauth.json
isn't checked.Expected behavior
Satis uses the
auth.json
data from the project root directory.Additional context
None.
The text was updated successfully, but these errors were encountered: