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

After upgrading Satis, 'composer create-project' no longer recognizes github-oauth token #728

Open
cscomfort opened this issue Jun 27, 2023 · 1 comment
Labels

Comments

@cscomfort
Copy link

Describe the bug
I recently upgraded our Satis instance to the latest version. Now, using the same satis.json file that I used in our previous instance, executing composer create-project our/project --repository=https://our.private.packages.host --stability=dev --no-install --remove-vcs now returns "Authentication required.

Currently using Satis version 3.0.0-dev 2023-06-09 17:13:21

Additional context
The project itself is hosted on our organization's GitHub Enterprise instance and, historically, we have included our github-oath credentials directly in the project's composer.json file, e.g.:

{
    "config": {
        "github-oauth": {
            "our.github.enterprise.host": "ACCESS_TOKEN"
        }
    }
}

Furthermore, I've tried adding the same token to the repository entry in satis.json:

{
  "name": "our/packagist",
  "homepage": "https://our.private.packages.host",
  "repositories": [
    {
      "name": "our/project",
      "type": "vcs",
      "url": "https://our.github.enterprise.host/account/project.git",
      "auth": {
        "github-oauth": {
          "our.github.enterprise.host": "ACCESS_TOKEN"
        }
      }
    }
  ],
  "require-all": true
}

As a further attempt to have the credentials recognized, I added them to Composer's auth.json config on the server -- our.private.packages.host in the above examples -- that hosts the Satis instance to no avail.

Lastly, I can confirm that when adding the same github-oauth token to my local Composer's auth.json the composer create-project command executes as expected -- confirming that the token itself is valid.

@cscomfort cscomfort added the bug label Jun 27, 2023
@alcohol
Copy link
Member

alcohol commented Jun 29, 2023

I'm sorry, but I fail to see how this is related to satis. composer create-project is part of Composer. Satis has nothing to do with this. Any credentials needed at that point should be provided to Composer, again not something Satis has any impact on. Without a reproducible scenario that shows how Satis is involved, I can't really dig deeper into this.

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