composer安装报错,发现是局域网的原因,还请帮忙解决下,或者有没有其他方法 [Composer\Repository\InvalidRepositoryException] No valid bower.json was found in any branch or tag of https://github.com/twitter/typeahead.js.git, could not load a package from it.
可以用composer 中国镜像
@qingdao #1楼 是用的中国镜像,不知道是不是里面的有些依赖还是指向的国外
如果安装失败,可以进入fecshop的文件夹,重试安装: composer update
composer update
已经处理,可在composer.json中加入github的token,方法如下 1.vim composer.json # 添加下面一段配置
"config": {
"process-timeout": 1800, "github-oauth": { "github.com": "此处输入您的github授权码" } },
2.获取github授权码
1) 点击 https://github.com/settings/tokens 2) 点击右上角 Generate new token 3) 在Token description中输入”可以任意” 4) 点击Generate token即可创建新的github授权码
将生成的授权码复制到 composer.json中的github.com对应的值中.
3.执行 composer update
参考与http://www.majianwei.com/linux安装yii2/