解决安装Laravel10报错问题You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"

2024-06-07   阅读:313   分类:后端    标签: Laravel

在安装laravel框架,执行conmposer install命令出现以下错误:

Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos

When working with _public_ GitHub repositories only, head here to retrieve a token:

https://github.com/settings/tokens/new?scopes=&description=Composer+on+DESKTOP-U8G28GM+2024-06-06+0831

This token will have read-only permission for public information only.

When you need to access _private_ GitHub repositories as well, go to:

https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+DESKTOP-U8G28GM+2024-06-06+0831

Note that such tokens have broad read/write permissions on your behalf, even if not needed by Composer.

Tokens will be stored in plain text in "C:/Users/Hm/AppData/Roaming/Composer/auth.json" for future use by Composer.

For additional information, check https://getcomposer.org/doc/articles/authentication-for-private-packages.md#github-oauth

Token (hidden):

No token given, aborting.

You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"

In Git.php line 473:

Failed to execute git clone --mirror -- https://github.com/symfony/service-contracts.git C:/Users/Hm/AppData/Local/Composer/vcs/https---github.com-symfony-service-contracts.git/

Cloning into bare repository 'C:/Users/Hm/AppData/Local/Composer/vcs/https---github.com-symfony-service-contracts.git'...

fatal: unable to access 'https://github.com/symfony/service-contracts.git/': Empty reply from server

解决方法:

根据提示,登录Github账号,然后在浏览器中访问上图红色箭头指的地址,网页拉到最下方,点击生成token,即可解决改问题

【腾讯云】2核2G云服务器新老同享 99元/年,续费同价,云服务器3年机/5年机限时抢购,低至 2.5折

‘简忆博客’微信公众号 扫码关注‘简忆博客’微信公众号,获取最新文章动态
转载:请说明文章出处“来源简忆博客”。http://tpxhm.com/adetail/1060.html

×
觉得文章有用就打赏一下文章作者
微信扫一扫打赏 微信扫一扫打赏
支付宝扫一扫打赏 支付宝扫一扫打赏

文章评论(0)

登录
简忆博客壁纸一
简忆博客壁纸二
简忆博客壁纸三
简忆博客壁纸四
简忆博客壁纸五
简忆博客壁纸六
简忆博客壁纸七
简忆博客壁纸八
头像

简忆博客
勤于学习,乐于分享

置顶推荐

打赏本站

如果你觉得本站很棒,可以通过扫码支付打赏哦!
微信扫码:你说多少就多少~
微信扫码
支付宝扫码:你说多少就多少~
支付宝扫码
×