Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Cannot install via Composer #17

Open
fantomas opened this issue Mar 24, 2017 · 14 comments
Open

Cannot install via Composer #17

fantomas opened this issue Mar 24, 2017 · 14 comments

Comments

@fantomas
Copy link

When I try to install it via Composer as in the documentation I get:

Updating dependencies (including require-dev)
  - Installing composer/installers (v1.2.0)
    Loading from cache

  - Installing raven/raven (0.15.0)
    Loading from cache

  - Installing amg-dev/amg-sentry-plugin (dev-master 5b307e2)
    Cloning 5b307e29c7a51da5d8c0467705a9f148d9ff0723
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+PC+2017-03-24+1151

What am I missing?

@buric
Copy link

buric commented Mar 24, 2017

Hello @fantomas,

just follow the link https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+PC+2017-03-24+1151 and create a new token and paste it in your terminal when asked.

Kind Regards

@fantomas
Copy link
Author

Hello @buric,

I am not sure why this was needed at first place. Why does it need to use the API? Some links that could be useful:

  1. Update to the new GitHub Authorizations API (breaking change) composer/composer#3566 (comment)
  2. https://developer.github.com/changes/2014-12-08-removing-authorizations-token/
  3. Composer Update Fails due to Github Authorization composer/composer#3542 (comment)
  4. https://github.com/composer/composer/blob/master/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens

I was aborting it and didn`t get the plugin. But if I give it an empty token it fails and it is taking the plugin from the dist, which is perfectly fine.

Token (hidden):
No token given, aborting.
You can also add it manually later by using "composer config github-oauth.github.com <token>"
    Failed to download amg-dev/amg-sentry-plugin from source: Failed to execute git clone --no-checkout "[email protected]:amg-dev/symfony-amg-sentry-plugin.git" "***\symfony_1.4_project\plugins\amgSentryPlugin" && cd /D "***\symfony_1.4_project\plugins\amgSentryPlugin" && git remote add composer "[email protected]:amg-dev/symfony-amg-sentry-plugin.git" && git fetch composer


    Now trying to download from dist
  - Installing amg-dev/amg-sentry-plugin (dev-master 5b307e2)
    Downloading: 100%

Package raven/raven is abandoned, you should avoid using it. Use sentry/sentry instead.
Writing lock file
Generating autoload files

@kumail-raza
Copy link

Hello @buric

Same question is mine, I am not sure why this was needed at first place?

@jpuck
Copy link

jpuck commented Feb 18, 2020

@kumail-raza are you perhaps on a mac? I only see this prompt from my host mac machine, but not when run inside a docker ubuntu container.

@Akshay6396
Copy link

You will follow this link to generate a new token

https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

@huchim
Copy link

huchim commented Jun 23, 2020

imagen

I had the same problem. Composer could not unzip dist package and try to clone repository, and maybe some repository is private.

{
    "require": {
        "vlucas/phpdotenv": "^2.5"
    }
}
apt-get update && apt-get install zip -y

@pradeepbedse
Copy link

Hello @fantomas,

just follow the link https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+PC+2017-03-24+1151 and create a new token and paste it in your terminal when asked.

Kind Regards

Thanks buddy it helped.

@jasonarli
Copy link

when i already create a token nothing happen at my terminal, it took so long. it never asked

@keiranmraine
Copy link

The correct thing to do is install the system libraries, not fall back to git access:

apt-get install zip unzip php-zip

@teemerson
Copy link

teemerson commented Dec 4, 2020

I've encountered this twice, different projects. Both were resolved by installing git in the docker or vagrant. An odd error resolved by installing git.

@AkashSivakumar-Dev
Copy link

I've encountered this twice, different projects. Both were resolved by installing git in the docker or vagrant. An odd error resolved by installing git.

Thank you very much. Was looking for this long time.

@krazzer
Copy link

krazzer commented Jun 23, 2021

I had this error as well, but I'm not using any private repo, so it didn't make sense to me to generate a token.

I could resolve this issue for myself by removing the vendor dir and running composer install again.

@suwidadi
Copy link

I had this error and ended with changing the owner of the .cache/composer/vcs/ folder to non-root

@looqmaan
Copy link

imagen

I had the same problem. Composer could not unzip dist package and try to clone repository, and maybe some repository is private.

{
    "require": {
        "vlucas/phpdotenv": "^2.5"
    }
}
apt-get update && apt-get install zip -y

Thanks, buddy! You save the day.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests