Yii2 Installation Error Using composer, github authorization problem, yii2github

Source: Internet
Author: User
Tags composer install

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.