首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >如何在数字海洋应用程序上正确部署laravel nova

如何在数字海洋应用程序上正确部署laravel nova
EN

Stack Overflow用户
提问于 2022-07-21 12:17:45
回答 1查看 223关注 0票数 2

我想部署一个laravel应用程序,它使用nova作为数字海洋应用程序平台上的后端。因此,我在应用程序设置中将所有环境变量添加为App-Level Environment Variables,包括将NOVA_USERNAME设置为nova emaill,将NOVA_PASSSWRD设置为nova许可密钥。在应用程序创建过程中,我得到了下面的错误

代码语言:javascript
运行
复制
[2022-07-21 11:43:25]        Warning from nova.laravel.com: 
[2022-07-21 11:43:25]        
[2022-07-21 11:43:25]        ***************************************************
[2022-07-21 11:43:25]        Unable to find user with the given email address: .
[2022-07-21 11:43:25]        ***************************************************
[2022-07-21 11:43:25]            Failed to download laravel/nova from dist: The 'https://nova.laravel.com/dist/laravel/nova/laravel-nova-f33003b1991491165e8822680e9a827f33c279c5-zip-383f38.zip' URL could not be accessed (HTTP 403): HTTP/2 403 
[2022-07-21 11:43:25]            Now trying to download from source
[2022-07-21 11:43:25]          - Syncing laravel/nova (4.2.1) into cache
[2022-07-21 11:43:27]        
[2022-07-21 11:43:27]        In Git.php line 484:
[2022-07-21 11:43:27]                                                                                       
[2022-07-21 11:43:27]          Failed to execute git clone --mirror -- 'git@github.com:laravel/nova.git' '  
[2022-07-21 11:43:27]          /layers/heroku_php/shim/php/.composer/cache/vcs/git-github.com-laravel-nova  
[2022-07-21 11:43:27]          .git/'                                                                       
[2022-07-21 11:43:27]                                                                                       
[2022-07-21 11:43:27]          Cloning into bare repository '/layers/heroku_php/shim/php/.composer/cache/v  
[2022-07-21 11:43:27]          cs/git-github.com-laravel-nova.git'...                                       
[2022-07-21 11:43:27]          Warning: Permanently added the ECDSA host key for IP address '140.82.121.4'  
[2022-07-21 11:43:27]           to the list of known hosts.                                                 
[2022-07-21 11:43:27]          git@github.com: Permission denied (publickey).                               
[2022-07-21 11:43:27]          fatal: Could not read from remote repository.                                
[2022-07-21 11:43:27]                                                                                       
[2022-07-21 11:43:27]          Please make sure you have the correct access rights                          
[2022-07-21 11:43:27]          and the repository exists.                                                   
[2022-07-21 11:43:27]                                                                                       
[2022-07-21 11:43:27]        
[2022-07-21 11:43:27]        install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>...]
[2022-07-21 11:43:27]        
[2022-07-21 11:43:27] 
[2022-07-21 11:43:27]  !     ERROR: Dependency installation failed!
[2022-07-21 11:43:27]  !     
[2022-07-21 11:43:27]  !     The 'composer install' process failed with an error. The cause
[2022-07-21 11:43:27]  !     may be the download or installation of packages, or a pre- or
[2022-07-21 11:43:27]  !     post-install hook (e.g. a 'post-install-cmd' item in 'scripts')
[2022-07-21 11:43:27]  !     in your 'composer.json'.
[2022-07-21 11:43:27]  !     
[2022-07-21 11:43:27]  !     Typical error cases are out-of-date or missing parts of code,
[2022-07-21 11:43:27]  !     timeouts when making external connections, or memory limits.
[2022-07-21 11:43:27]  !     
[2022-07-21 11:43:27]  !     Check the above error output closely to determine the cause of
[2022-07-21 11:43:27]  !     the problem, ensure the code you're pushing is functioning
[2022-07-21 11:43:27]  !     properly, and that all local changes are committed correctly.
[2022-07-21 11:43:27]  !     
[2022-07-21 11:43:27]  !     For more information on builds for PHP on Heroku, refer to
[2022-07-21 11:43:27]  !     https://devcenter.heroku.com/articles/php-support
[2022-07-21 11:43:27] 
[2022-07-21 11:43:27] ERROR: failed to build: exit status 1

处理部署的正确方法是什么?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-07-21 12:48:50

您必须告诉composer使用env变量:composer config http-basic.nova.laravel.com ${NOVA_USERNAME} ${NOVA_PASSWORD}

来源:https://laracasts.com/discuss/channels/nova/how-to-deployment-laravel-nova

更新heroku:添加具有以下值的COMPOSER_AUTH env变量(替换凭据)

代码语言:javascript
运行
复制
{
    "http-basic": {
        "nova.laravel.com": {
            "username": "foo",
            "password": "bar"
        }
    }
}
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73066026

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档