Could not fetch https://api.github.com/repos/RobinHerbots/jquery

使用 composer 安装YII2时, 如题所示提示, 原因是由于yii安装中, 需要有一些相关的认证[或许说是composer的认证], 如有如下提示

Could not fetch https://api.github.com/authorizations, enter your GitHub credentials to go over the API rate limit

The credentials will be swapped for an OAuth token stored in /home/debm/.composer/auth.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username: 

 

那么可以输入github的帐号与密码进行下一步的安装, 如果输入了帐号, 密码, 还继续让输入的话, 是因为 红字标出的文件不可写, 可以到  

composer global require "fxp/composer-asset-plugin:1.0.0-beta4"

这一步执行之后, 所生成的文件夹里, 把 .composer 文件夹, 修改权限为 777 权限. 然后, 再重新执行 

composer create-project yiisoft/yii2-app-basic basic 2.0.1

此命令.  如果仍然继续提示输入帐号, 密码的话, 大可 ctrl-d 退出, 然后重新执行  composer create-project yiisoft/yii2-app-basic basic 2.0.1 这一命令. 

可能是由于缓存或是其他原因导致, 最后就可以看到执行成功的界面了 

debm@debm:/var/www/local.yii2.eg$ sudo composer create-project yiisoft/yii2-app-basic basic 2.0.1
Installing yiisoft/yii2-app-basic (2.0.1)
  - Installing yiisoft/yii2-app-basic (2.0.1)
    Loading from cache

Created project in basic
Loading composer repositories with package information
Installing dependencies (including require-dev)
  - Installing yiisoft/yii2-composer (2.0.1)               
    Downloading: 100%         

  - Installing ezyang/htmlpurifier (v4.6.0)
    Downloading: 100%         

  - Installing swiftmailer/swiftmailer (v5.3.1)
    Downloading: 100%         

  - Installing bower-asset/jquery (2.1.3)
    Downloading: 100%         

  - Installing bower-asset/yii2-pjax (v2.0.2)
    Downloading: 100%         

  - Installing bower-asset/punycode (v1.3.2)
    Downloading: 100%         

  - Installing bower-asset/jquery.inputmask (3.1.49)
    Downloading: 100%         

  - Installing cebe/markdown (1.0.1)
    Downloading: 100%         

  - Installing yiisoft/yii2 (2.0.1)
    Downloading: 100%         

  - Installing yiisoft/yii2-swiftmailer (2.0.1)
    Downloading: 100%         

  - Installing yiisoft/yii2-codeception (2.0.1)
    Downloading: 100%         

  - Installing bower-asset/bootstrap (v3.3.1)
    Downloading: 100%         

  - Installing yiisoft/yii2-bootstrap (2.0.1)
    Downloading: 100%         

  - Installing yiisoft/yii2-debug (2.0.1)
    Downloading: 100%         

  - Installing bower-asset/typeahead.js (v0.10.5)
    Downloading: 100%         

  - Installing phpspec/php-diff (v1.0.2)
    Downloading: 100%         

  - Installing yiisoft/yii2-gii (2.0.1)
    Downloading: 100%         

  - Installing fzaninotto/faker (v1.4.0)
    Downloading: 100%         

  - Installing yiisoft/yii2-faker (2.0.1)
    Downloading: 100%         

Writing lock file
Generating autoload files
chmod('runtime', 0777)...done.
chmod('web/assets', 0777)...done.
chmod('yii', 0755)...done.

 

 

转载于:https://www.cnblogs.com/debmzhang/p/4204346.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值