WWW.lllT.neT

下边由composer实例教程频道给各位讲解有关Composer 组装时需要键入受权用户名密码的问题,期待对必须的小伙伴有些协助!

D:workdreamland-yii>composer require "saviorlv/yii2-dysms:dev-master"

    Authentication required (packagist.phpcomposer.com):
      Username:
      Password:


  [ComposerDownloaderTransportException]
  Invalid credentials for 'https://packagist.phpcomposer.com/p/saviorlv/yii2-dysms$045b85ee8f7a846caecdf82efa78fb4927e19868940b05fbb3ddb6383a10d41f.json', aborting.require [--dev] [--prefer-source] [--prefer-dist] [--no-progress] [--no-suggest] [--no-update] [--no-scripts] [--update-no-dev] [--update-with-dependencies] [--update-with-all-dependencies] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packages] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--] [<packages>]...

必须改成我国的composer源,post请求插口表明的“There is an arrear problem with this JSS account that prevents the operation from completing successfully” 翻译工作为:“此JSS账号存有扣费问题,造成实际操作没法取得成功进行”.....

改成中国镜像源就好了 https://pkg.phpcomposer.com/

composer config -g repo.packagist composer https://packagist.phpcomposer.com

随后我这里又发生一个问题

D:workdreamland-yii>composer require "saviorlv/yii2-dysms:dev-master"
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)

Could not fetch https://api.github.com/repos/bestiejs/punycode.js/tags?per_page=100, 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 JL-HOST-008-PC 2018-10-13 0916
to retrieve a token. It will be stored in "C:/Users/niuben/AppData/Roaming/Composer/auth.json" for future use by Composer.
Token (hidden):

它要我键入一个token???

通过网络查询 这是由于Composer 沒有加上github密匙

解决方案

进到 https://github.com/settings/tokens 点一下 「Generate new token」(还记得先登陆哦

新创建一个 Token,键入叙述,挑选默认设置新创建就可以了,随后便会获得一个 Token,随后把这个值黏贴以往就 OK 了。

Composer安装时需要键入受权用户名密码是什么原因

以上便是Composer安装时需要键入受权用户名密码是什么原因的详尽具体内容,大量请关心自学java网其他相关文章!

WWW.lllT.neT

声明:有的资源来自网络转载,版权归原作者所有,如有侵犯到您的权益请联系邮箱:our333@126.com我们将配合处理!

原文地址:Composer安装时需要键入受权用户名密码是什么原因发布于2021-12-11 19:45:01