Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Composer install Laravel asks for authentication for Github

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.

like image 254
Znarkus Avatar asked Feb 07 '14 14:02

Znarkus


People also ask

Can I install Laravel without Composer?

You do not need to run Composer on your server as well as locally, once you run composer install or composer update your project will have all its dependencies available and you can just upload it straight to your server. Hope it helps!!

What is Composer install in Laravel?

phar install (or composer install ) command to install all of the framework's dependencies. This process requires Git to be installed on the server to successfully complete the installation. If you want to update the Laravel framework, you may issue the php composer.

What is Composer github?

Composer helps you declare, manage, and install dependencies of PHP projects. See https://getcomposer.org/ for more information and documentation.

Why is Composer needed for Laravel?

The main purpose of the composer is to install the dependencies or libraries for an application. The composer also provides the users to install the PHP applications available on the Packagist, where Packagist is the main repository that contains all the available packages.


2 Answers

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.

like image 85
Quetzy Garcia Avatar answered Sep 30 '22 00:09

Quetzy Garcia


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.

like image 36
Antonio Carlos Ribeiro Avatar answered Sep 30 '22 01:09

Antonio Carlos Ribeiro