E
E
Egor Mikheev2015-11-16 02:31:38
GitHub
Egor Mikheev, 2015-11-16 02:31:38

Tokken github not working in auth.json composer?

Hello, I have not been able to solve the problem for several days. For some reason, tokken does not work to bypass download volume restrictions in github in composer.
I scored data both at the root level and at the directory level. both in auth.json and composer.json, wrote commands, all to no avail:

Could not fetch https://api.github.com/repos/yiisoft/jquery-pjax, please create a GitHub OAuth token to go over the API rate limit
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+aurus.me+2015-11-16+0220
to retrieve a token. It will be stored in "/root/.composer/auth.json" for future use by Composer.
Token (hidden):

--global github-oauth.github.com "ab046cf3ee906d4aa67b20bab01fdfe6ddd7ead6"

auth.json:
{
    "http-basic": {},
    "github-oauth": {
        "github.com": "ab046cf3ee906d4aa67b20bab01fdfe6ddd7ead6"}
}

composer.json
"config": {
        "process-timeout": 1800,
        "github-oauth": {
                 "github.com": "ab046cf3ee906d4aa67b20bab01fdfe6ddd7ead6"
        }
    },

When installing composer wrote the following:
Deprecation Notice: The Composer\Package\LinkConstraint\MultiConstraint class is deprecated, use Composer\Semver\Constraint\MultiConstraint instead. in phar:///usr/local/bin/composer/src/Composer/Package/LinkConstraint/MultiConstraint.php:17
Deprecation Notice: The Composer\Package\LinkConstraint\LinkConstraintInterface interface is deprecated, use Composer\Semver\Constraint\ConstraintInterface instead. in phar:///usr/local/bin/composer/src/Composer/Package/LinkConstraint/LinkConstraintInterface.php:17
Also set
composer global require "fxp/composer-asset-plugin:1.1"

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Egor Mikheev, 2015-11-16
@ogregor

All the same, it worked when I registered authorization at the composer.json level in the directory with the distribution.

{
  "config": {
    "github-oauth": {
      "github.com": "вот здесь токен"
    }
  }
}

To be honest, I didn’t understand why this configuration didn’t work last time, but now I deleted all the auth.json files, on some of the forums they wrote that this could be a critical moment.

E
expert10, 2016-02-12
@expert10

Thank you for the solution, I had the same hemorrhoid, thanks to you I managed. I tried to pervert in every way, but only authorization in composer.json helped

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question