加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 站长学院 > PHP教程 > 正文

php – oauth-private.key不存在或不可读

发布时间:2020-12-13 21:59:02 所属栏目:PHP教程 来源:网络整理
导读:所以,我从Bitbucket导入了另一个项目并尝试使用php artisan服务启动它,我总是得到这个错误: [LogicException] Key path "file:///var/www/html/DesignViewer5/storage/oauth-private.key" does not exist or is not readable 我自己创建项目时没有收到此错
所以,我从Bitbucket导入了另一个项目并尝试使用php artisan服务启动它,我总是得到这个错误:

[LogicException]                                                                   
  Key path "file:///var/www/html/DesignViewer5/storage/oauth-private.key" does not   
  exist or is not readable

我自己创建项目时没有收到此错误,我无法执行任何其他命令.我试过’php artisan key:generate’,并得到完全相同的错误.

我试过:作曲家更新,得到了这个:

Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 0 installs,1 update,0 removals
  - Updating spatie/laravel-permission (1.11.1 => 1.12.0) Downloading: 100%         
Writing lock file
Generating autoload files
> IlluminateFoundationComposerScripts::postUpdate
> php artisan optimize


  [LogicException]                                                             
  Key path "file:///var/www/html/DesignViewer5/storage/oauth-private.key" doe  
  s not exist or is not readable                                               


Script php artisan optimize handling the post-update-cmd event returned with error code 1

任何人都知道如何解决它?谢谢!

解决方法

我认为这是由于Laravel Passport,你应该尝试以下命令:

php artisan passport:install

This command will create the encryption keys needed to generate secure
access tokens. In addition,the command will create “personal access”
and “password grant” clients which will be used to generate access
tokens

资料来源:https://laravel.com/docs/5.4/passport

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读