作曲家隐藏令牌



每次更新作曲家时,我都必须输入在github上生成的令牌。
我使用此插件来安装鲍尔软件包。

这发生在 github.com/RamonSmit/Nestable.git 成为私人回购之后。
我删除了对此存储库的所有引用。

但我仍然收到消息:

需要 GitHub 凭据才能获取私有存储库元数据 (git://github.com/RamonSmit/Nestable.git(

前往 https://github.com/settings/tokens/new?scopes=repo&description=... 以检索令牌。它将存储在"..."供作曲家将来使用。 令牌(隐藏(:

我将作曲家和作曲家资产插件更新到最新版本并清除了缓存。

这也不起作用:

composer config --global github-oauth.github.com xxx

如何摆脱此不必要的消息?

composer diag输出:

Checking composer.json: FAIL
require.yiisoft/yii2 : unbound version constraints (>=2.0.6) should be avoided
require.yiisoft/yii2-bootstrap : unbound version constraints (*) should be avoided
require.yiisoft/yii2-swiftmailer : unbound version constraints (*) should be avoided
require.fishvision/yii2-migrate : unbound version constraints (*) should be avoided
require.infoweb-internet-solutions/yii2-cms : unbound version constraints (*) should be avoided
require.bower-asset/matchHeight : unbound version constraints (@stable) should be avoided
require.infoweb-internet-solutions/yii2-news : unbound version constraints (*) should be avoided
require.infoweb-internet-solutions/yii2-action : unbound version constraints (*) should be avoided
require.infoweb-internet-solutions/yii2-member : unbound version constraints (*) should be avoided
require.dragonjet/yii2-opengraph : unbound version constraints (*) should be avoided
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com oauth access: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: xxx
Dev Public Key Fingerprint: xxx
OK
Checking composer version: OK

auth.json : (位于 C:\Users\User\AppData\Roaming\Composer(

{
    "github-oauth": {
        "github.com": "xxx"
    },
    "http-basic": {
        "bitbucket.org": {
            "username": "xxx",
            "password": "xxx"
        }
    }
}

composer global show -i

Changed current directory to C:/Users/Ruben/AppData/Roaming/Composer
fxp/composer-asset-plugin v1.1.1 NPM/Bower Dependency Manager for Composer

作曲家.json:

{
  "name": "yiisoft/yii2-app-advanced",
  "description": "Yii 2 Advanced Project Template",
  "keywords": [
    "yii2",
    "framework",
    "advanced",
    "project template"
  ],
  "homepage": "http://www.yiiframework.com/",
  "type": "project",
  "license": "BSD-3-Clause",
  "support": {
    "issues": "https://github.com/yiisoft/yii2/issues?state=open",
    "forum": "http://www.yiiframework.com/forum/",
    "wiki": "http://www.yiiframework.com/wiki/",
    "irc": "irc://irc.freenode.net/yii",
    "source": "https://github.com/yiisoft/yii2"
  },
  "minimum-stability": "dev",
  "require": {
    "php": ">=5.4.0",
    "yiisoft/yii2": ">=2.0.6",
    "yiisoft/yii2-bootstrap": "*",
    "yiisoft/yii2-swiftmailer": "*",
    "fishvision/yii2-migrate": "*",
    "infoweb-internet-solutions/yii2-cms": "*",
    "bower-asset/matchHeight": "@stable",
    "infoweb-internet-solutions/yii2-news": "*",
    "infoweb-internet-solutions/yii2-action": "*",
    "infoweb-internet-solutions/yii2-member": "*",
    "dragonjet/yii2-opengraph": "*",
    "infoweb-internet-solutions/yii2-image-gallery": "*"
  },
  "require-dev": {
    "yiisoft/yii2-codeception": "*",
    "yiisoft/yii2-debug": "*",
    "yiisoft/yii2-gii": "*",
    "yiisoft/yii2-faker": "*"
  },
  "config": {
    "process-timeout": 1800,
    "preferred-install": "source"
  },
  "extra": {
    "asset-installer-paths": {
      "npm-asset-library": "vendor/npm",
      "bower-asset-library": "vendor/bower"
    }
  },
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/infoweb-internet-solutions/yii2-i18n-module"
    },
    {
      "type": "vcs",
      "url": "https://github.com/infoweb-internet-solutions/yii2-ckeditor"
    },
    {
      "type": "vcs",
      "url": "git@bitbucket.org:infoweb-internet-solutions/yii2-news.git"
    },
    {
      "type": "vcs",
      "url": "git@bitbucket.org:infoweb-internet-solutions/yii2-action.git"
    },
    {
      "type": "vcs",
      "url": "git@bitbucket-infoweb:infoweb-internet-solutions/yii2-member.git"
    }
  ]
}

作曲家.锁

你应该在github上生成新的令牌

设置 \ 开发人员设置 \ 个人访问令牌

请注意,令牌也可以手动添加到composer.json文件中:

{
    "require": {
        "infoweb-internet-solutions/yii2-action": "*",
    },
    "config": {
        "github-oauth": {
            "github.com": "your long token"
        }
    },
    "repositories": [
        {
            "type": "vcs",
            "url": "git@bitbucket.org:infoweb-internet-solutions/yii2-action.git"
        },
    ]
}
<小时 />

但是,如果要将文件提交到 VCS 存储库,则可能不希望在文件中包含凭据。在这种情况下,您可以使用 COMPOSER_AUTH 环境变量来传递相同的信息。

export COMPOSER_AUTH='{"github-oauth":{"github.com": "your long token"}}'
composer update

删除composer.lock文件。

然后删除供应商文件夹并再次运行 composer 以安装所有软件包。

相关内容

  • 没有找到相关文章

最新更新