首页 > Windows开发 > 详细

Windows下Composer使用问题

时间:2015-04-28 18:44:24      阅读:2962      评论:0      收藏:0      [点我收藏+]

    通常来说,Composer的在Windows下的安装非常简单,如下几步即可完成!cmd下运行命令:

    方案一:curl -s http://getcomposer.org/installer | php , 如果你的curl不能用,也可以使用一下的方案。

    方案二:直接下载软件来安装 https://getcomposer.org/Composer-Setup.exe


    然后是更新问题:只需要在cmd下再运行如下命令:

    php composer.phar self-update


    然后你可能在更新或者是执行composer过程中遇到下面的问题

    1.Could not fetch https://api.github.com/repos/jquery/jquery, enter your GitHub cr
edentials to go over the API rate limit
    The credentials will be swapped for an OAuth token stored in C:/Users/idiot/AppD
ata/Roaming/Composer/auth.json, your password will not be stored
    To revoke access to this token you can visit https://github.com/settings/applica
tions
    Username: 

    2.Your github oauth token for github.com contains invalid characters: ""


    这里的错误是因为你的github的token值无效或者失效,需要你新增一个token。


    解决方案

    1.首先你要更新到最新版本:php composer.phar self-update

    2.登录到Github https://github.com/settings/applications “generated a token”增加一个新的Token

    3.运行cmd  php composer.phar config -g github-oauth.github.com token (token值为你新增的)


    这样就解决掉问题了,哈哈 !

本文出自 “Shows technology” 博客,请务必保留此出处http://wangzhijun.blog.51cto.com/9660708/1639859

Windows下Composer使用问题

原文:http://wangzhijun.blog.51cto.com/9660708/1639859

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!