laravel - 通过作曲家安装 Laravel Nova 在生产服务器上失败
问题描述
我已将 Laravel Nova 添加到我们的应用程序中并购买了许可证。在本地服务器上一切正常。但是,当我尝试将更新的应用程序部署到我们的 linux 服务器并运行composer update它说:
Failed to download laravel/nova from dist: /var/www/{myPath} does not exist and could not be created.
Now trying to download from source
Syncing laravel/nova (3.29.0) into cache
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
Head to https://github.com/settings/tokens/new It will be stored in "/var/www/{myPath}"
所以我创建了一个GitHub 令牌并将 Laravel Nova 凭据添加到服务器上的auth.json文件中。一切都应该是正确的,并且正如我之前所说,它正在处理本地副本。但是,我收到以下错误:
[RuntimeException]
Failed to execute git clone --mirror -- 'git@github.com:laravel/nova.git' '/var/www/{myPath}/.cache/composer/vcs/git-github.com-laravel-nova.git/'
Cloning into bare repository '/var/www/{myPath}/.cache/composer/vcs/git-github.com-laravel-nova.git'...
ERROR: Repository not found.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我该如何解决这个问题?
解决方案
删除/vendor
目录和composer.lock
文件并运行composer install --optimize-autoloader --no-dev
解决了问题。
推荐阅读
- c - 在c中以微秒为单位获取时间戳,最大可变大小为32位
- azure - 是否可以将 AzureAppConfiguration 与 Azure Function ServiceBusTrigger 一起使用
- reflex - 无法将软件包安装到 nix-build 项目
- php - 如何迭代到带有子数组的数组并在其中显示值
- ?
- java - 如果我们可以使用 JPA 在 Postgres DB 中创建 Enum,有什么办法吗?
- php - 为什么在尝试重新启动 Apache 时会出现语法错误?
- xml - 如何使用 BS4 将新标签附加到 xml 树?
- php - 如何创建带有标题的 CSV,以便可以将其导入 Excel
- reactjs - 如果使用 alignItems:"center",为什么反应导航元素不显示?
- c# - 如果文本框的双值具有空值,我必须收到一条消息