TransportException - Composer trying to download file from my API... NOT FOUND - php

I am getting a TransportException when I run composer update on Ubuntu using a fresh install of Laravel Forge.
forge#trust-dale-production-V2:~/default$ composer update
> php artisan clear-compiled
Loading composer repositories with package information
[Composer\Downloader\TransportException]
The "https://api.github.com/repos/amcardwell/trust-dale" file could not be downloaded (HTTP/1.1 404 Not Found)
I am able to run a composer install... and I can use git connect to my git repo and push/pull. Here is an output of composer diag:
forge#trust-dale-production-V2:~/default$ composer diag
Checking composer.json: WARNING
require.yangqi/htmldom : unbound version constraints (dev-master) should be avoided
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: OK
Why am I getting this error?

I figured it out. I didnt have a github oauth token linked yet. Thanks :)

Related

Authentication required (packagist.org) Laravel installation

I'm using Ubuntu 16.04 and trying to install Laravel (any version). Actually I cloned from GitHub the Laravel project (https://github.com/laravel/laravel) After cloning I'm running the command as below:
root:/var/www/html/laravel$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Authentication required (packagist.org):
Username:
This is the issue I'm facing, I don't know what username I have to give, and why its asking authentication.. And if I run composer diagnose I get this output:
composer diagnose
Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: Authentication required (packagist.org):
Username:
Any suggestions or can anyone tell what was I'm missing here?
run composer config --global repo.packagist composer https://packagist.org and then try again. This should prevent it from using http protocol and force https which might fix it in case you have a bad proxy in the way.
In my case, solved the issue as below:
$ 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
The I ran
$ 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]
Then again, I ran
$ composer self-update
However, during installing the package, it still shows:
Authentication required (repo.packagist.org):
Username:
After providing my username and password for my packagist.org account and having my credential stored in /Users/xxx/.composer/auth.json, the issue was resolved.
Try running this composer config --global repo.packagist composer https://packagist.org first on your CLI

Laravel framework install failed on xampp

Hi guys when I install laravel framework with composer I have two errors. How can I solve this? Thanks in advance !
composer global require "laravel/installer=~1.1"
Errors :
[RuntimeException]
Could not load package laravel/framework in http://packagist.org:
[UnexpectedValueException]
Could not parse version constraint ^1.0.4: Invalid version string "^1.0.4"
..
[UnexpectedValueException]
Could not parse version constraint ^1.0.4: Invalid version string "^1.0.4"
**
**Edited :**
composer diagnose
Checking composer.json: FAIL
name : The property name is required
description : The property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
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 composer version: OK
**
Use below command to install a new laravel project of a specific version
composer create-project laravel/laravel your_project_name 4.2.*
here 4.2.* is the version
Edit:
Update your composer.
You can use below command:
composer self-update
and then create project like this:
composer create-project laravel/laravel {you-project-name} 4.2 --prefer-dist

Composer HTTP 400 Bad request when downloading Laravel

I am getting an issue of 400 bad request connecting over http, and it seems the package only wants to be installed via http. I tried an override in composer.json as tried by others as workaround to force https - but that doesn't seem to work. I'm not behind a firewall. Mac OS 10.10.3
Issue :
composer diagnose
Checking composer.json: FAIL
the property name is required
the property description is required
No license specified, it is recommended to do so. For closed-source software you may use "proprietary" as license.
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking composer version: OK
[Composer\Downloader\TransportException]
The "http://packagist.org/p/provider-2013$c2596c5d04e7701561420666ba120ede9429a69c75b732a5a01b18ebb3d64e53.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Composer.json
{
"repositories": [
{ "packagist": false }
,
{
"type": "composer",
"url": "https://packagist.org"
}
]
}
Composer version 1.0-dev (92faf1c7a83a73794fb914a990be435e1df373ca)
2015-07-14 12:37:15
For me quitting Forticlient (antivirus/web security app) removed the 400 bad request error and allowed me to download laravel via composer.
Maybe you have antivirus software or similar that is interfering.
I'm on Mac OS X 10.11
I have same problem and I use composer diagnose -vvv
Checking git settings: Executing command (CWD): git config color.ui
OK
Checking http connectivity to packagist: Downloading http://packagist.org/packages.json
FAIL
[Composer\Downloader\TransportException] The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.1 400 Bad Request)
Because I install Forticlient, stop it and everything work fine.
I am installing Yii2 on my Mac OS X El Capitan 10.11.06 and resolved as follows.
In my case I had to close an application (antivirus/web security app)
FortiClient Aplication Close
Then try again to make the composer command
composer global require "fxp/composer-asset-plugin:^1.2.0"

i am having issues installing laravel

I am having issues installing laravel. I have followed the first two methods, (composer global require "laravel/installer=~1.1") and (composer create-project laravel/laravel --prefer-dist) on this site and they failed.
I guess upon looking through the forums i need to output my result for compose diag......
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity: OK
Checking HTTP proxy: OK
Checking HTTP proxy support for request_fulluri: FAIL
Unable to assert the situation, maybe packagist.org is down (The "http://packagist.org/packages.json" file could not be downloaded (HTTP/1.0 400 Bad Request))
Checking HTTPS proxy support for request_fulluri: OK
Checking disk free space: OK
Checking composer version: OK
I want to know why i cannot install laravel with these two methods.
I am using a proxy. Yes. But i don't know what reques_fulluri means and what it does.

Can't update/install using composer behind a corporate firewall

i'm trying to get composer to work on our server but i keep getting issues trying to install/update repositories.
I have configured the environment variables correctly to achieve all this:
http_proxy=http://fastweb.int.bell.ca:8083/
ftp_proxy=ftp://fastweb.int.bell.ca:8083/
HTTP_PROXY_REQUEST_FULLURI=false
I have also forced my composer to use HTTPS protocol only using the configuration directive:
"config": {
"github-protocols": ["https"]
}
We tried to update the ca_bundle following the post SSL certificate rejected trying to access GitHub over HTTPS behind firewall by setting the GIT_SSL_NO_VERIFY or updating the ca-bundle.crt in /etc/pki/tls/certs...
Nothing seems to work!
Here's the output, it does it for all packages, i tried with and without --prefer-source just to see if it would help, still nothing...
./composer.phar update Loading composer repositories with package
information Updating dependencies (including require-dev)
- Updating crazycodr/data-transform (dev-master 11f8499 => 2.0.2)
Checking out 11f8499d0027468705fca72ab67acfbf8ee2e6be
[RuntimeException] Failed to clone
https://github.com/crazycodr/data-transform.git via git, https and
http protocols, aborting.
- https://github.com/crazycodr/data-transform.git
fatal: https://github.com/crazycodr/data-transform.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?
I confirm being able to clone/pull/push a GitHub repo behind a firewall.
And you do need https_proxy in addition of http_proxy:
set http_proxy=http://<login_internet>:<password_internet>#aproxy:aport
set https_proxy=http://<login_internet>:<password_internet>#aproxy:aport
set no_proxy=.company
(the no_proxy part is there to avoid using the proxy for internal url, internal to the company)

Categories