Problems and workarounds for installing YII2 using composer under windows

Source: Internet
Author: User
Tags oauth

The first time under Windows installation process YII2, the whole process encountered a lot of problems, after twists and turns, fortunately finally successfully solved.

First, download Yii2 template

Using composer to install the YII2, you first need to download the application template, which is divided into basic template and advanced application template two kinds. Advanced Template Download

Second, GitHub token

Problem:

When installing YII2 applications, such as the use of commands

PHP composer.phar create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced.. /yii2_app

You will be asked to enter tokens at this time.

Workaround:

1, first exit cmd;

2, use the link url:https://github.com/settings/tokens, click Generate New token, Generate a new token (eg: bc018abcdeabcdea2ddef0qq119ca3f1234512345);

3. Next, enter the command in CMD:

PHP Composer.phar config-g github-oauth.github.com bc018abcdeabcdea2ddef0qq119ca3f1234512345

At this point, in the file Auth.json, you can see

{    "Http-basic": {},    "Github-oauth": {        "github.com": "bc018abcdeabcdea2ddef0qq119ca3f1234512345< Span style= "color: #FF0000;" ></span> "}}

4, re-execute the command, complete the installation of the YII2 application

PHP composer.phar create-project--prefer-dist--stability=dev yiisoft/yii2-app-advanced.. /yii2_app


Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Problems and workarounds for installing YII2 using composer under windows

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.