satis icon indicating copy to clipboard operation
satis copied to clipboard

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

Open cscomfort opened this issue 2 years ago • 1 comments

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 avatar Jun 27 '23 14:06 cscomfort

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.

alcohol avatar Jun 29 '23 07:06 alcohol