安装Laravel时为什么要问我一个令牌
My laptop has 3 php versions 7.2, 7.4 and 8.1
when installing a brand new laravel i got asked about a token even it's not installing a private repo
Why is that?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我刚刚发现
auth.json
文件已损坏,因此我将其删除是因为现在不需要它。它位于
$ home/.config/composer/
中I just found out that
auth.json
file is corrupted, So i deleted it as no need for it now.it is located in
$HOME/.config/composer/
最简单的解决方案之一是,您可以删除/卸载作曲家并用其所有内容勾选标记,然后再次安装作曲家。
它只会删除您的全局laravel/安装程序。
希望它对您有用。
One of the easiest solutions is you may remove/uninstall the composer and tick mark with all of its contents and then install again the composer.
It will just remove your global laravel/installer.
Hope it will work for you.
当您发现此错误时,请按照以下步骤进行操作。

打开github帐户在打开配置文件时单击设置。
正确配置您的作曲家身份extiration,您需要使用将生成的令牌添加到
auth.json
文件中。首先,导航到目录c:\ users \ hp \ appdata \ roaming \ composer \
。如果在此处找到现有的auth.json
文件,请使用文本编辑器打开它,然后根据当前格式插入您的令牌。如果不存在auth.json
文件,则需要手动创建它。只需在Composer目录中创建一个名为auth.json
的新文件。使用文本编辑器打开此新文件,并添加以下JSON结构:When you find this error follow these steps.

Open the github account goto you profile by click on setting when you open the profile.
To properly configure your Composer authentication, you need to add your generated token to the
auth.json
file. First, navigate to the directoryC:\Users\HP\AppData\Roaming\Composer\
. If you find an existingauth.json
file there, open it with a text editor and insert your token according to the current format. If theauth.json
file is not present, you will need to manually create it. Simply create a new file namedauth.json
in the Composer directory. Open this new file with a text editor and add the following JSON structure: