yii2-rbac-module icon indicating copy to clipboard operation
yii2-rbac-module copied to clipboard

Could not install through Composer

Open K0styan opened this issue 9 years ago • 3 comments

There is error message - Failed to download vova07/yii2-rbac-module from dist: The "https://api.github.com/repos/vova07/yii2-start-rbac-module/zipball/11dc36ee0ad97f3265c52d938d57f5d57e9ffa1f" file could not be downloaded (HTTP/1.1 302 Found)

K0styan avatar Feb 07 '16 20:02 K0styan

Такая же проблема. Она же и в соседнем issue. Устанавливал vova07/yii2-users-module(зависит от vova07/yii2-rbac-module) и она нормально установилось(где-то в начале 2015г(еще была yii 2.0.2 или 2.0.3). А сейчас(20 мая 2016) понадобилось сделать "composer update" (т.к. уже Yii стал 2.0.8) и процесс обновления вываливается с этой ошибкой. Полный лог для "composer require --prefer-dist vova07/yii2-rbac-module "*":

Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing vova07/yii2-control-widget (0.1.0)
    Loading from cache

  - Installing vova07/yii2-rbac-module (0.1.0)
    Downloading: Failed
    Failed to download vova07/yii2-rbac-module from dist: The "https://api.githu
b.com/repos/vova07/yii2-start-rbac-module/zipball/11dc36ee0ad97f3265c52d938d57f5
d57e9ffa1f" file could not be downloaded (HTTP/1.1 302 Found)
    Now trying to download from source
  - Installing vova07/yii2-rbac-module (0.1.0)
    Cloning 11dc36ee0ad97f3265c52d938d57f5d57e9ffa1f
    11dc36ee0ad97f3265c52d938d57f5d57e9ffa1f is gone (history was rewritten?)

Installation failed, reverting ./composer.json to its original content.


  [RuntimeException]
  Failed to execute git checkout "11dc36ee0ad97f3265c52d938d57f5d57e9ffa1f" -
  - && git reset --hard "11dc36ee0ad97f3265c52d938d57f5d57e9ffa1f" --
  fatal: reference is not a tree: 11dc36ee0ad97f3265c52d938d57f5d57e9ffa1f

yiigenius avatar May 21 '16 10:05 yiigenius

Решено(Solved): Нужно явно указать репозитории в composer.json (Add to composer.json) :

{
....
,
"repositories":[
    {
    "type": "git",
    "url": "https://github.com/vova07/yii2-users-module",
    "url": "https://github.com/vova07/yii2-rbac-module"
    }
]
}

Спасибо (Thanks) https://github.com/BrSlava :+1: https://github.com/vova07/yii2-users-module/issues/13#issuecomment-136136198

yiigenius avatar May 21 '16 14:05 yiigenius

Указал как написал yiigenius. Ошибка Key url is a duplicate in ./composer.json at line 48 Написал так: { "type": "git", "url": "https://github.com/vova07/yii2-users-module" }, { "type": "git", "url": "https://github.com/vova07/yii2-rbac-module" } Ничего не установилось Nothing to install, update or remove Package phpunit/php-token-stream is abandoned, you should avoid using it. No replacement was suggested. Generating autoload files

Yura1976 avatar Sep 20 '21 17:09 Yura1976