statamic / cli

Install and manage your Statamic projects from the command line.
71 stars 19 forks source link

Improve messaging around missing composer github token #43

Closed insight-media closed 2 years ago

insight-media commented 2 years ago

Bug description

When installing a starter kit in an existing project or installing a new Statamic project with a starter kit, i get the error message:

Preparing starter kit [insight-media/statamic-starterkit]...
Starter kit config [starter-kit.yaml] does not exist.

This error happens when installing any starter kit from the market place. And also my own private starter kit (which definitely has a starter-kit.yaml file)

How to reproduce

php please starter-kit:install studio1902/statamic-peak (or any starter pack)

Logs

php please starter-kit:install studio1902/statamic-peak

 Clear site first? (yes/no) [no]:
 > yes

Collections cleared successfully.
Navigations cleared successfully.
Trees cleared successfully.
Taxonomies cleared successfully.
Assets cleared successfully.
Globals cleared successfully.
Forms cleared successfully.
Users cleared successfully.
User groups cleared successfully.
User roles cleared successfully.
Blueprints cleared successfully.
Fieldsets cleared successfully.
Views cleared successfully.
Statamic configs reset successfully.
Preparing starter kit [studio1902/statamic-peak]...
Starter kit config [starter-kit.yaml] does not exist.

Versions

Statamic v3.2.32 PHP 8.0.14 and PHP 8.0.15

On Windows 10 21H1 and Ubuntu 18.04.1 LTS

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

insight-media commented 2 years ago

I solved the issue by adding a github personal access token to my global composer config.

composer config -g github-oauth.github.com xxxxxxxxxxxxxxxxxx

I think the installer encounters a github rate limit but doesn't throw an error. Then proceeds to install the starter-kit from the vendor folder, which is not present.

edalzell commented 2 years ago

Still feels like a bug to me, just a different one.

robdekort commented 2 years ago

Maybe the CLI should ask for this token when it's not available or something. Not having configured a GH token is the source of every issue concerning installing starter kits. It happens so often. What do you think @jesseleite?

robdekort commented 2 years ago

This issue can be transferred to the CLI repo btw.

jesseleite commented 2 years ago

The error is misleading for sure 🤔

This issue can be transferred to the CLI repo btw.

Also wouldn't GH token issues happen on both statamic new and php please starter-kit:install outside of the CLI?

robdekort commented 2 years ago

Good point!