首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >需要身份验证(packagist.org) Laravel安装

需要身份验证(packagist.org) Laravel安装
EN

Stack Overflow用户
提问于 2016-09-30 15:51:25
回答 2查看 10.3K关注 0票数 6

我正在使用Ubuntu 16.04并尝试安装Laravel (任何版本)。实际上,我从GitHub克隆了Laravel项目(https://github.com/laravel/laravel),在克隆之后,我正在运行以下命令:

代码语言:javascript
复制
root:/var/www/html/laravel$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Authentication required (packagist.org): 
  Username: 

这就是我面临的问题,我不知道我必须提供什么用户名,也不知道为什么要进行身份验证。如果我运行composer diagnose,我会得到这样的输出:

代码语言:javascript
复制
composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: Authentication required    (packagist.org):
  Username:

有什么建议吗?有人能告诉我这里遗漏了什么吗?

EN

回答 2

Stack Overflow用户

发布于 2018-10-16 21:38:27

请运行composer config --global repo.packagist composer https://packagist.org,然后重试。这应该阻止它使用http协议,并强制https,这可能会修复它的情况下,你有一个坏的代理的方式。

票数 18
EN

Stack Overflow用户

发布于 2018-09-04 19:44:14

在我的例子中,解决了如下问题:

代码语言:javascript
复制
$ composer diagnose

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys: FAIL
Missing pubkey for tags verification
Missing pubkey for dev verification
Run composer self-update --update-keys to set them up
Checking composer version: WARNING
You are not running the latest stable version, run `composer self-update` to update (1.6.3 => 1.7.2)
Composer version: 1.6.3
PHP version: 7.2.8
PHP binary path: /usr/local/Cellar/php/7.2.8/bin/php

我跑了

代码语言:javascript
复制
$ composer self-update --update-keys

Open https://composer.github.io/pubkeys.html to find the latest keys
Enter Dev / Snapshot Public Key (including lines with -----): 
[copy and paste the dev pub key]

Enter Tags Public Key (including lines with -----):
[copy and paste the tags pub key]

然后,我又跑了

代码语言:javascript
复制
$ composer self-update

但是,在安装程序包的过程中,仍然会显示:

代码语言:javascript
复制
Authentication required (repo.packagist.org):
  Username:

在为我的packagist.org帐户提供我的用户名和密码并将我的凭据存储在/Users/xxx/.composer/auth.json中之后,问题就解决了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/39786363

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档