网站首页技术博客

Yii安装提示​

洞天水月2021-03-12 14:32:281253人次阅读
摘要Could not fetch https://api.github.com/repos/jquery/jquery-dist, please create a GitHub OAuth token to go over the API rate limit Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+PC-Dtshy+2016-06-27+1812 to retrieve a token. It will be stored in "C:/Users/Administ

yii官网的安装指令

php composer.phar global require "fxp/composer-asset-plugin:~1.1.1"

现在选择的应用程序模板之一,开始安装 Yii 2.0。应用程序模板是一个包含Yii写的骨架Web应用程序包。

  • 安装基本的应用程序模板,运行下面的命令:

    php composer.phar create-project yiisoft/yii2-app-basic basic 2.0.8
  • 安装高级的应用程序模板,运行下面的命令:

    php composer.phar create-project yiisoft/yii2-app-advanced advanced 2.0.8

这是针对没有composer客户端的情况,需要下载composer.phar文件,下载地址https://getcomposer.org/composer.phar

如果已经安装过composer客户端用下面命令即可

composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project yiisoft/yii2-app-basic basic 2.0.8

或者

composer create-project yiisoft/yii2-app-advanced advanced 2.0.8

Yii安装报错出现:

Could not fetch https://api.github.com/repos/jquery/jquery-dist, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+PC-Dtshy+2016-06-27+1812
to retrieve a token. It will be stored in "C:/Users/Administrator/AppData/Roaming/Composer/auth.json" for future use by Composer.
Token (hidden):

安装需要access_token

解决办法:注册github账号,个人中心->setting中添加access_token,添加后会显示access_token复制填入即可,这个access_token只可看到一次

文章评论