下面由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%24045b85ee8f7a846caecdf82efa78fb4927e19868940b05fbb3ddb6383a10d41f.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] [--] []...
需要改为中国的composer源,请求接口显示的“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 updatedLoading composer repositories with package informationUpdating 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 limitHead to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+JL-HOST-008-PC+2018-10-13+0916to 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密钥
解决方法
Jenni AI
使用最先进的 AI 写作助手为您的写作增光添彩。
48 查看详情
进入 https://github.com/settings/tokens 点击 「Generate new token」(记得先登录哦)
新建一个 Token,输入描述,选择默认新建就行,然后就会得到一个 Token,然后把这个值粘贴过去就 OK 了。

以上就是Composer安装时要求输入授权用户名密码是怎么回事的详细内容,更多请关注创想鸟其它相关文章!
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至 chuangxiangniao@163.com 举报,一经查实,本站将立刻删除。
发布者:程序猿,转转请注明出处:https://www.chuangxiangniao.com/p/752965.html
微信扫一扫
支付宝扫一扫