Yii2: composer install bower-asset/punycode fail!!!

Created on 9 Jan 2017  路  15Comments  路  Source: yiisoft/yii2

This is console output:

- Installing bower-asset/punycode (v1.3.2) Downloading: Failed    Failed to download bower-asset/punycode from dist: The "https://api.github.com/repos/bestiejs/punycode.js/zipball/bc39b1333f2747030d69d89b76af49e571366205" file could not be downloaded (HTTP/1.1 302 Found)
    Now trying to download from source
  - Installing bower-asset/punycode (v1.3.2)The authenticity of host 'github.com (192.30.253.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
 Cloning bc39b1333f


  [RuntimeException]                                                                               
  Failed to clone https://github.com/bower-asset/punycode.git via https, ssh protocols, aborting.  
  - https://github.com/bower-asset/punycode.git                                                    
    Cloning into '/data/web/test/vendor/bower-asset/punycode'...                                   
    remote: Invalid username or password.                                                          
    fatal: Authentication failed for 'https://github.com/bower-asset/punycode.git/'                
  - [email protected]:bower-asset/punycode.git                                                        
    Cloning into '/data/web/test/vendor/bower-asset/punycode'...                                   
    Permission denied (publickey).                                                                 
    fatal: Could not read from remote repository.                                                  

    Please make sure you have the correct access rights                                            
    and the repository exists. 

Composer requires:

"require": {
        "php": ">=7.0.0",
        "yiisoft/yii2": "^2.0",
        "yiisoft/yii2-bootstrap": "^2.0",
        "yiisoft/yii2-swiftmailer": "^2.0",
        "yiisoft/yii2-redis": "^2.0",
        "yiisoft/yii2-imagine": "^2.0",
        "yiisoft/yii2-authclient": "^2.0",
        "yiisoft/yii2-httpclient": "^2.0",
        "symfony/process": "^3.1"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "^2.0",
        "yiisoft/yii2-gii": "^2.0",
        "yiisoft/yii2-faker": "^2.0",
        "codeception/base": "^2.0",
        "codeception/verify": "~0.3.1"
    },

Version:
yii-2.0.10
composer-1.3.1
php-7.0.14
fxp/composer-asset-plugin-1.2.2
os:ubuntu-16.04

to be verified

Most helpful comment

Hate to say that, but we all had got some sorts of weird behavior of composer in China.
Try the following steps:

  1. 'Update "fxp/composer-asset-plugin",
    composer global update "fxp/composer-asset-plugin"
  2. Delete the 'vendor' folder
  3. Delete the 'composer.lock' file at root folder.
  4. composer install

http://pkg.phpcomposer.com/ This url may help you increase the download speed in China.

All 15 comments

unable to reproduce. a composer.json with those requirements installs fine for me.

$ composer --version
Composer version 1.2.0 2016-07-19 01:28:52
$ composer global show |grep asset-plugin
Changed current directory to /home/cebe/.composer
fxp/composer-asset-plugin             v1.2.2 NPM/Bower Dependency Manager for Composer
 [RuntimeException]
  Failed to clone https://github.com/bower-asset/punycode.git via https, ssh protocols, aborting.
  - https://github.com/bower-asset/punycode.git
    Cloning into 'E:\web\luckybao\vendor\bower-asset\punycode'...
    remote: Repository not found.
    fatal: repository 'https://github.com/bower-asset/punycode.git/' not found
  - [email protected]:bower-asset/punycode.git
    Cloning into 'E:\web\luckybao\vendor\bower-asset\punycode'...
    **ERROR: Repository not found.**
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

ERROR: Repository not found ?

This page https://github.com/bower-asset/punycode, 404
Why this repository was deleted?

I edit the vendor/composer/install.json file, and add
```
{
"name": "bower-asset/punycode",
"version": "v1.3.2",
"version_normalized": "1.3.2.0",
"source": {
"type": "git",
"url": "https://github.com/bower-asset/punycode.git",
"reference": "bc39b1333f2747030d69d89b76af49e571366205"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/bc39b1333f2747030d69d89b76af49e571366205",
"reference": "bc39b1333f2747030d69d89b76af49e571366205",
"shasum": ""
},
"type": "bower-asset-library",
"extra": {
"bower-asset-main": "punycode.js",
"bower-asset-ignore": [
"coverage",
"tests",
".*",
"component.json",
"Gruntfile.js",
"node_modules",
"package.json"
]
},
"installation-source": "dist"
},

```
then, i put punycode source in vendor/bower. now is ok.
My English is bad, thanks for your reply.

I tried on four different servers(3 in China, 1 in Japan), are the same problem.
You can delete vendor directory, then reinstall.

that is really weird, that repository does not exists and should not. The real repository for that package is https://github.com/bestiejs/punycode.js

Do you get the latest information from packagist or are you using some intermediate cache?

Could be firewall as well. When I recently was in mainland China I've got all sorts of weird behavior of composer...

Could be that they cached the effect of the composer issue we had a few weeks ago so that it now comes to china? :)

Unlikely but possible.

Hate to say that, but we all had got some sorts of weird behavior of composer in China.
Try the following steps:

  1. 'Update "fxp/composer-asset-plugin",
    composer global update "fxp/composer-asset-plugin"
  2. Delete the 'vendor' folder
  3. Delete the 'composer.lock' file at root folder.
  4. composer install

http://pkg.phpcomposer.com/ This url may help you increase the download speed in China.

http://pkg.phpcomposer.com/ This url may help you increase the download speed in China.

they should make sure to clean their cache then and update the latest data from packagist.

Hmm i have the same problem now from germany. Tested from several datacenters and home.
(fresh install)
Any advice?

PS D:\git\web-stack\appdata\html> composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing yiisoft/yii2-composer (2.0.4)
    Downloading: 100%

  - Installing ezyang/htmlpurifier (v4.8.0)
    Loading from cache

  - Installing cebe/markdown (1.1.1)
    Loading from cache

  - Installing bower-asset/jquery (2.2.4)
    Downloading: 100%

  - Installing bower-asset/yii2-pjax (v2.0.6)
    Downloading: 100%

  - Installing bower-asset/punycode (v1.3.2)
    Downloading: Failed
    Failed to download bower-asset/punycode from dist: The "https://api.github.com/repos/bower-asset/punycode/zipball/38c8d3131a82567bfef18da09
f7f4db68c84f8a3" file could not be downloaded (HTTP/1.1 404 Not Found)
    Now trying to download from source
  - Installing bower-asset/punycode (v1.3.2)
    Cloning 38c8d3131a82567bfef18da09f7f4db68c84f8a3


  [RuntimeException]
  Failed to clone https://github.com/bower-asset/punycode.git via https, ssh protocols, aborting.
  - https://github.com/bower-asset/punycode.git
    Cloning into 'D:\git\web-stack\appdata\html\vendor\bower\punycode'...
    remote: Invalid username or password.
    fatal: Authentication failed for 'https://github.com/bower-asset/punycode.git/'
  - [email protected]:bower-asset/punycode.git
    Cloning into 'D:\git\web-stack\appdata\html\vendor\bower\punycode'...
    Permission denied (publickey).
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progre
ss] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--ignore-platform-reqs] [--] [<packages>]...

PS D:\git\web-stack\appdata\html> composer global update "fxp/composer-asset-plugin"
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
PS D:\git\web-stack\appdata\html>

composer update is working fine. i dont get it.

Ok, well the only solution i have found to fix the composer.lock manually:

grafik

after that composer install is working again.

@ItsReddi when was that lockfile created?

The code in the lock file was changed at 19.12.2016
But i have no clue why, because the commit installs an extension without any dependencies.

I have some other problems right now with bower-assets at all. Maybe we have huge problems in lock file i will invastigate that tomorrow and give an update if i can find something out.

it could be that the lock file was created at the time when there was a problem with packagist serving wrong information on the bower asset.

Ok well,
i reinstalled the extension(same version) that was installed with this lock change. And anything fine.
The problems i talked about are an different approach. Failure in my dockerfile.

Maybe like @cebe mentioned some wrong information somewhere at some time.
But since im not the only one it is making me nervous i will start to delete vendor/cache each time now after someone updated our lock file ;)

Was this page helpful?
0 / 5 - 0 ratings