获得了github.com的github oauth token for github.com的github oauth token包含无效的字符:
当我通过作曲家安装JUI DateTimePicker时,我要求给Git令牌安装它。我已经从gitlab生成了令牌,并将令牌提供到终端。我还用令牌更改了Composer.json文件。但这给我带来了"意想不到的valueException"的错误。
我尝试了遵循解决方案:1(我已删除了.git文件夹,并尝试更新作曲家仍然相同的问题
2(我已删除了供应商,并重新安装了作曲家。
3(我已删除了供应商和composer.json,并将以前的供应商和composer.json文件从我的备份中。但仍然有同样的问题。
4(我试图从以下代码中更改令牌:
composer config --global github-oauth.github.com <TOKEN>
5(还将以下代码放在composer.json:
中{
"config": {
"github-oauth": {
"github.com": "<TOKEN>"
}
}
}
仍然相同的问题。
我的composer.json文件如下:
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Application Template",
"keywords": ["yii2", "framework", "advanced", "application 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": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"claudejanz/yii2-mygii": "dev-master",
"bower-asset/jquery": "@stable",
"bower-asset/jquery.inputmask": "@stable",
"bower-asset/punycode": "@stable",
"bower-asset/bootstrap": "@stable",
"3ch3r46/bootui-datepicker": "1.0.0",
"yiisoft/yii2-jui": "*",
"udokmeci/yii2-phone-validator" : "dev-master"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*"
},
"suggest": {
"codeception/codeception": "Codeception, 2.0.* is currently works well with Yii.",
"codeception/specify": "BDD style code blocks for PHPUnit and Codeception",
"codeception/verify": "BDD Assertions for PHPUnit and Codeception",
"yiisoft/yii2-faker": "Fixtures generator for Yii2 based on Faker lib"
},
"scripts": {
"post-create-project-cmd": [
"yii\composer\Installer::setPermission"
]
},
"config": {
"process-timeout": 1800
},
"extra": {
"writable": [
"backend/runtime",
"backend/web/assets",
"frontend/runtime",
"frontend/web/assets"
],
"executable": [
"yii"
],
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
请有人帮助。
我不确定它停止为您工作的原因是什么,但是正如我们在评论中所讨论的那样,解决方案是在auth.json
中更新存储此github token的条目。
对于每个寻求此解决方案的每个人-auth.json
都存储在您的COMPOSER_HOME
路径中。您可以通过在控制台
composer config -g data-dir
有关作曲家配置的更多信息,请参阅getcomposer.org的Composer文档。