Composer安裝時(shí)要求輸入授權(quán)用戶名密碼是什么原因

這篇文章主要介紹“Composer安裝時(shí)要求輸入授權(quán)用戶名密碼是什么原因”,在日常操作中,相信很多人在Composer安裝時(shí)要求輸入授權(quán)用戶名密碼是什么原因問題上存在疑惑,小編查閱了各式資料,整理出簡單好用的操作方法,希望對(duì)大家解答”Composer安裝時(shí)要求輸入授權(quán)用戶名密碼是什么原因”的疑惑有所幫助!接下來,請(qǐng)跟著小編一起來學(xué)習(xí)吧!

創(chuàng)新互聯(lián)建站從2013年成立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目成都做網(wǎng)站、成都網(wǎng)站建設(shè)網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢想脫穎而出為使命,1280元中山做網(wǎng)站,已為上家服務(wù),為中山各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:028-86922220

D:\work\dreamland-yii>composer require "saviorlv/yii2-dysms:dev-master"

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


  [Composer\Downloader\TransportException]
  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] [--] [<packages>]...

需要改為中國的composer源,請(qǐng)求接口顯示的“There is an arrear problem with this JSS account that prevents the operation from completing successfully” 翻譯為:“此JSS帳戶存在欠費(fèi)問題,導(dǎo)致操作無法成功完成”.....

改用國內(nèi)鏡像源就好了 https://pkg.phpcomposer.com/

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

然后我這里又出現(xiàn)一個(gè)問題

D:\work\dreamland-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):

它讓我輸入一個(gè)token???

經(jīng)過網(wǎng)上查詢 這是因?yàn)镃omposer 沒有添加github密鑰

解決方法

進(jìn)入 https://github.com/settings/tokens 點(diǎn)擊 「Generate new token」(記得先登錄哦)

新建一個(gè) Token,輸入描述,選擇默認(rèn)新建就行,然后就會(huì)得到一個(gè) Token,然后把這個(gè)值粘貼過去就 OK 了。

到此,關(guān)于“Composer安裝時(shí)要求輸入授權(quán)用戶名密碼是什么原因”的學(xué)習(xí)就結(jié)束了,希望能夠解決大家的疑惑。理論與實(shí)踐的搭配能更好的幫助大家學(xué)習(xí),快去試試吧!若想繼續(xù)學(xué)習(xí)更多相關(guān)知識(shí),請(qǐng)繼續(xù)關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編會(huì)繼續(xù)努力為大家?guī)砀鄬?shí)用的文章!

網(wǎng)頁標(biāo)題:Composer安裝時(shí)要求輸入授權(quán)用戶名密碼是什么原因
網(wǎng)頁路徑:http://bm7419.com/article44/gihjhe.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號(hào)定制網(wǎng)站、小程序開發(fā)外貿(mào)建站、做網(wǎng)站、外貿(mào)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

成都做網(wǎng)站