Yii2 Installation Error Using composer, github authorization problem, yii2github
I 've been learning about yii2.0 and want to use the officially recommended composer for installation. I 've never been successful. I 've reported an error, and it's been bothering me.
Theme
Terminal errors:
➜ Yii2.0 composer create-project yiisoft/yii2-app-advanced yii2-advanced -- prefer-dist
Installing yiisoft/yii2-app-advanced (2.0.12)
-Installing yiisoft/yii2-app-advanced (2.0.12): Downloading (100%)
Created project in yii2-advanced
Loading composer repositories with package information
Updating dependencies (including require-dev)
[Composer \ Repository \ InvalidRepositoryException]
No valid bower. json was found in any branch or tag of https://github.com/bestiejs/punycode.js.git, cocould not load a package from it.
Create-project [-s | -- stability STABILITY] [-- prefer-source] [-- prefer-dist] [-- repository REPOSITORY] [-- repository-url REPOSITORY-URL] [-- dev] [-- no-dev] [-- no-custom-installers] [-- no-scripts] [-- no-progress] [-- no-secure-http] [-- keep-vcs] [-- no-install] [-- ignore-platform-reqs] [--] [<package>] [<directory>] [<version>]
Problem description:
Enter
composer create-project yiisoft/yii2-app-advanced yii2-advanced --prefer-dist
Then the error ....
Solution:
Currently, I have found that the solution to this problem is:
Directly edit the composer. json file in the yii2-advanced folder
vi yii2-advanced/composer.json
Then add github authorization
Set
"config": { "process-timeout": 1800 },
Change
"Config": {"process-timeout": 1800, "github-oauth": {"github.com": "Enter your github authorization code "}},
Save the file and run the following command to import the yii2 framework.
cd yii2-advancedcomposer update
How do I obtain the github authorization code ??
Https://github.com/settings/tokens
Click this link --> Click Generate new token in the upper right corner --> enter "yii composer install Token" in token description"
--> Click Generate token to create a github authorization code.
You can enter the description in Token description at will.