contao / contao-manager

Contao Manager
GNU Lesser General Public License v3.0
85 stars 33 forks source link

Cloud Resolver Fehler bei privatem Package von github.com #562

Closed rorych closed 4 years ago

rorych commented 4 years ago

Gem. https://community.contao.org/de/showthread.php?78130-Contao-Bundle-von-privatem-Repo-mit-dem-Contao-Manager-Cloud-Resolver-installieren

System: Conteo 4.9 Contao Manager 1.2.4 PHP 7.4

Ausgangslage: Laufende Contao 4.9 Installation mit einem privaten Repo eingebunden via :

"repositories": [
    {
        "type": "vcs",
        "url": "https://username:meintoken@github.com/company/contao-xyz-bundle.git"
    }
]

Lokal kann anschliessend erfolgreich ein composer update durchgeführt werden. Das private Bundle wird dabei installiert.

Problem: Beim Versuch das gleiche via Contao Manager bzw. Cloud Resolver zu machen, erhalte ich folgende Meldung:

> The Composer Cloud failed with status code 200

  Composer Resolver returned an unexpected status code

Response:
{
   "jobId":"KyCfyVoHhuKieYZWKVvFS4ZuHyEiVD80xtGTs8io6dOmDlUDAPudFsFCgW0d5GADcqXNMeFMuut6qK",
   "status":"finished_with_errors",
   "retries":0,
   "worker":"worker-contao-production-75865f6bd9-bh4c4",
   "queuePosition":1,
   "links":{
      "composerJson":"\/jobs\/KyCfyVoHhuKieYZWKVvFS4ZuHyEiVD80xtGTs8io6dOmDlUDAPudFsFCgW0d5GADcqXNMeFMuut6qK\/composerJson",
      "composerLock":"\/jobs\/KyCfyVoHhuKieYZWKVvFS4ZuHyEiVD80xtGTs8io6dOmDlUDAPudFsFCgW0d5GADcqXNMeFMuut6qK\/composerLock",
      "composerOutput":"\/jobs\/KyCfyVoHhuKieYZWKVvFS4ZuHyEiVD80xtGTs8io6dOmDlUDAPudFsFCgW0d5GADcqXNMeFMuut6qK\/composerOutput"
   },
   "stats":{
      "averageProcessingTimeInMs":81816,
      "numberOfJobsInQueue":0,
      "numberOfWorkers":10,
      "appVersion":"2.2.7",
      "phpVersion":"7.4.4",
      "composerVersion":"1.10.1",
      "host":"web-production-79485d49cd-krsd4"
   },
   "sponsoredBy":{
      "name":"Contao Association",
      "link":"https:\/\/association.contao.org"
   }
}

Ganzer Output - ohne Token: https://wetransfer.com/downloads/4cc72569dc73568d084cdbc16954d0a120200604085300/4a4f948cad892caabd1d9271d05c3e6320200604085314/5f736e

Gem. Forums-Feedback, müsste das funktionieren, daher melde ich mich hier. Mache ich was falsch oder ist das ein Bug?

fritzmg commented 4 years ago

Does the composer update work locally?

rorych commented 4 years ago

Yes it does

aschempp commented 4 years ago

It is most likely that your local computer does have access to the repository (e.g. through public key/SSH authentication), but the Cloud Resolver does not. Private repositories need to use URL authentication to work with the cloud resolver, but unfortunately GitHub does not support that.

rorych commented 4 years ago

Thanks for your help and the great work on the contao manager and cloud resolver - awesome tool!

Okay so the problem is, that GitHub doesn't support authentication via URL? Do you know if Bitbucket or Gitlab support it and if they would work with the cloud resolver?

aschempp commented 4 years ago

I know that Gitlab and Private Packagist support it.

fritzmg commented 4 years ago

It is most likely that your local computer does have access to the repository (e.g. through public key/SSH authentication), but the Cloud Resolver does not. Private repositories need to use URL authentication to work with the cloud resolver, but unfortunately GitHub does not support that.

But he is not using SSH, he is using HTTPS with URL authentication. Or does composer automatically fall back to git@github.com:… when using https://github.com/…?

rorych commented 4 years ago

Just tested it in Bitbucket and GitLab.

On Bitbucket it runs on the local installation but not on the cloud resolver. On Gitlab i didn't get it running on either.

@aschempp Do you have a running example?

aschempp commented 4 years ago

I don't. But did you include authentication info in the repository URL?

rorych commented 4 years ago

Yes, in different options (username:token, username:password, ?private_token=token) I think i'll just use private packagist, that worked last time i tested it with the trial...

aschempp commented 4 years ago

I can't really tell. Just be aware that you can't use the auth.json, it has to be in the repository URL.

fritzmg commented 4 years ago

@rorych did you define your GitHub tokens in a local auth.json? That would may be explain, why it works locally, but not in the cloud.

rorych commented 4 years ago

No i don't have any auth.json setup.

I'm going to change to Private Packagist, that seems the best move.