无法安装 Voyager - 使用 ssh 密钥进行身份验证时克隆失败,请输入您的 GitHub 凭据以访问私有存储库

问题描述

我有一个无法解决的问题。我无法安装 Voyager(Windows 10/XAMPP/Laravel 8.20.1)。我在我的项目目录中运行命令 composer require tcg/voyager,但我不断收到以下错误消息:

Installing dependencies from lock file (including require-dev)
Package operations: 1 install,0 updates,0 removals
– Installing tcg/voyager (1.x-dev e9160b7): cloning e9160b7c10
cloning Failed using an ssh key for authentication,enter your GitHub credentials to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+DESKTOP-8VORIAK+2020-12-31+1216
to retrieve a token. It will be stored in “C:/Users/Diana/AppData/Roaming/Composer/auth.json” for future use by Composer.
Token (hidden): Install of tcg/voyager Failed

Installation Failed,reverting ./composer.json and ./composer.lock to their original content.

[ErrorException]
copy(phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/console/Helper/../Resources/bin/hiddeninput.exe): Failed to open
stream: phar error: “vendor/symfony/console/Resources/bin/hiddeninput.exe” is not a file in phar “C:/ProgramData/ComposerSetup/bin/composer
.phar”

我关注了 github 链接,但我看到的只是生成新的个人访问令牌的能力,而没有关于如何处理它的说明。

非常感谢有关如何解决此问题的一些想法。

谢谢

解决方法

我遇到了同样的问题,我使用了一个没有任何范围的随机个人访问令牌,然后它就可以工作了。 sample

,

You can read this documentation of how to create the personal access toke. And how to use this in terminal

您可以忽略此警告,因为 tcg/voyager 不是私人存储库。