无法解析您的密钥,Error in Laravel v6

It was not possible to parse your key, Error in Laravel v6

我正在使用 Laravel v6.2,passport v9.2。在本地主机上,它的完美运行甚至不会产生任何问题。 当我在生产服务器上部署代码时,它开始产生问题,它给出错误。 我匹配,php 版本在生产服务器上也相同。但是错误只在生产中产生而不是在本地产生,而代码和每件事在两者上都是相同的。 我搜索并发现我应该更新护照但是为此我还需要更新 laravel 版本,出于某种原因我不想更新 laravel.

谁能帮我解决这个问题?

日志:

InvalidArgumentException {#1726
 #message: "It was not possible to parse your key, reason: "
  #code: 0
  #file: "/var/www/quickxi-food/vendor/lcobucci/jwt/src/Signer/OpenSSL.php"
  #line: 90
  trace: {
    /var/www/quickxi-food/vendor/lcobucci/jwt/src/Signer/OpenSSL.php:90 {}
    /var/www/quickxi-food/vendor/lcobucci/jwt/src/Signer/OpenSSL.php:47 {}
    /var/www/quickxi-food/vendor/lcobucci/jwt/src/Signer/OpenSSL.php:21 {}
    /var/www/quickxi-food/vendor/lcobucci/jwt/src/Signer/BaseSigner.php:36 {}
    /var/www/quickxi-food/vendor/lcobucci/jwt/src/Builder.php:470 {}
    /var/www/quickxi-food/vendor/lcobucci/jwt/src/Builder.php:450 {}
    /var/www/quickxi-food/vendor/league/oauth2-server/src/Entities/Traits/AccessTokenTrait.php:53 {}
    /var/www/quickxi-food/vendor/league/oauth2-server/src/Entities/Traits/AccessTokenTrait.php:61 {}
    /var/www/quickxi-food/vendor/league/oauth2-server/src/ResponseTypes/BearerTokenResponse.php:31 {}
    /var/www/quickxi-food/vendor/league/oauth2-server/src/AuthorizationServer.php:202 {}
    /var/www/quickxi-food/vendor/laravel/passport/src/PersonalAccessTokenFactory.php:116 {}
    /var/www/quickxi-food/vendor/laravel/passport/src/PersonalAccessTokenFactory.php:71 {}
    /var/www/quickxi-food/vendor/laravel/passport/src/HasApiTokens.php:67 {}
    /var/www/quickxi-food/app/Http/Controllers/ApiController/AuthController.php:64 {
      App\Http\Controllers\ApiController\AuthController->login(Request $request, $store = false) …
      › 
      › $token          = $user->createToken('SpoonJet')->accessToken;
      › $user->token    = $token;
    }

我找到了解决方案,在我的情况下,这是生产服务器上的用户权限问题。如果你们中有人面临同样的问题,您可以应用此解决方案,或者在您的情况下可以采用不同的解决方案。