Composer 安裝東西遇到github需要token怎么辦


 

安裝yii2遇到這樣的提示:

Could not fetch https://api.github.com/repos/jquery/sizzle/contents/bower.json?ref=917b312f1d0777d3cccf6ceace2621bb9e8009b2, 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+JIAN-PC+2017-05-11+1400
to retrieve a token. It will be stored in “C:/Users/Administrator/AppData/Roaming/Composer/auth.json” for future use by Composer.

這時候只要輸入一個token就可以了,這個token在哪里創建或者獲取呢?在這https://github.com/settings/tokens/,如果沒有賬號先注冊一個github賬號。這是github為了控制下載速度,避免資源被濫用采取的措施。

第一步:創建新的token

github創建token

點擊右上角Generate new token(初始化新的token).

第二步:填寫token相關信息

 

填寫token相關信息

寫 Token description,也就是這token的描述,方便自己下次查看token了解這個token用在哪里,什么時候創建的,用來干嘛。Select scopes選項都打勾就可以,打勾了這個就不限制你速度。然后最底下點擊Generate token 即可得到授權的token.

第三部:把得到的token填寫到報需要填寫token的地方,重新執行剛才要執行的composer安裝執行即可。

本人博客地址:Composer 安裝東西遇到github需要token怎么辦


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM