getsentry / symfony-amg-sentry-plugin

Symfony 1.4 plugin for Sentry interface.
MIT License
7 stars 14 forks source link

Cannot install via Composer #17

Open fantomas opened 7 years ago

fantomas commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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. https://github.com/composer/composer/issues/3566#issue-52308363
  2. https://developer.github.com/changes/2014-12-08-removing-authorizations-token/
  3. https://github.com/composer/composer/issues/3542#issuecomment-67623002
  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 "git@github.com: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 "git@github.com: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 commented 4 years ago

Hello @buric

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

jpuck commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

keiranmraine commented 3 years ago

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

apt-get install zip unzip php-zip
teemerson commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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

looqmaan commented 2 years ago

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.