报错信息如下:
Could not fetch https://api.github.com/repos/jquery/jquery, 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+localhostto retrieve a token. It will be stored in “/root/.composer/auth.json” for future use by Composer. Token (hidden):
产生该问题的原因,由于网络不稳定等问题频繁的拉取造成拒绝连接,无法获取https://api.github.com/repos/jquery/jquery,。请创建一个GitHub OAuth令牌以越过API速率限制前往
解决办法:访问下面的网站进入GitHub,生成git token
https://github.com/settings/tokens/new?scopes=repo
在Note中输入信息,根据自己的需求勾选相关参数,滑动最下面点击Generate token生成令牌参数。生成后的参数粘贴到centos报错对话框中即可。
以下是关于GitHub 令牌的官方文档:
https://docs.github.com/zh/rest/authentication/authenticating-to-the-rest-api?apiVersion=2022-11-28