安装Laravel时为什么要问我一个令牌

发布于 2025-02-07 01:40:34 字数 255 浏览 3 评论 0原文

我的笔记本电脑具有3个PHP版本7.2、7.4和8.1 安装全新的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

enter image description here

Why is that?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

无语# 2025-02-14 01:40:35

我刚刚发现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/

吃不饱 2025-02-14 01:40:35

最简单的解决方案之一是,您可以删除/卸载作曲家并用其所有内容勾选标记,然后再次安装作曲家。

它只会删除您的全局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.

狂之美人 2025-02-14 01:40:35

当您发现此错误时,请按照以下步骤进行操作。
“当您找到此错误时,请按照以下步骤“访问以下步骤”

打开github帐户在打开配置文件时单击设置。

“打开github帐户在github帐户中got

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

    {
        "http-basic": {},
        "github-oauth": {
            "github.com": "__TOKEN__"}
    }

“

When you find this error follow these steps.
When you find this error follow these steps

Open the github account goto you profile by click on setting when you open the profile.

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 directory C:\Users\HP\AppData\Roaming\Composer\. If you find an existing auth.json file there, open it with a text editor and insert your token according to the current format. If the auth.json file is not present, you will need to manually create it. Simply create a new file named auth.json in the Composer directory. Open this new file with a text editor and add the following JSON structure:

    {
        "http-basic": {},
        "github-oauth": {
            "github.com": "__TOKEN__"}
    }

3

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文