Composer install Laravel asks for authentication f

2019-02-21 21:51发布

When I try to install a Laravel project from a composer.lock file, Composer prompts me for authentication.

$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing laravel/framework (v4.1.21)
    Authentication required (api.github.com):
      Username:

$ composer --version
Composer version 7343198817f365b1676ced0f353808f0e408ff9a 2014-02-07 09:59:35

$ php -i | grep ssl
Registered Stream Socket Transports => tcp, udp, unix, udg, ssl, sslv3, tls
openssl

I have OpenSSL installed. Using PHP 5.5.3 on Ubuntu 13.10.

Any idea how to get around this? Tried to give it my Github credentials, but it didn't work.

2条回答
贪生不怕死
2楼-- · 2019-02-21 22:25

Happens a lot with Composer.

This is a temporary composer/packagist problem: it's not being able to download required files (usually due to timeout) and when file access is 'denied' it asks for the VCS password.

查看更多
我想做一个坏孩纸
3楼-- · 2019-02-21 22:26

I ran into the same issue and a coworker suggested to run:

composer install --prefer-source

which will git clone

Description:

Forces installation from package sources when possible, including VCS information.

He also noted that:

composer install --prefer-dist

will download a zipped version of the package.

Description:

Forces installation from package dist even for dev versions.

In either case, the API is not used.

查看更多
登录 后发表回答