小编Bri*_*ywo的帖子

无法解密 config/credentials.yml.enc。也许你传错了钥匙?

我最近删除了我的本地项目,但做了一个 git clone 并从我上次提交的地方开始。当我尝试将图像上传到已配置的 AWS 时,出现以下错误:

Aws::Sigv4::Errors::MissingCredentialsError in RentalsController#create


Cannot load `Rails.config.active_storage.service`: missing credentials, provide credentials with one of the following options: - :access_key_id and :secret_access_key - :credentials - :credentials_provider
Run Code Online (Sandbox Code Playgroud)

我试图查看我的credentials.yml文件是否有任何错误,但是当我输入此命令时:

EDITOR="code --wait" rails credentials:edit
Run Code Online (Sandbox Code Playgroud)

...我收到此错误:

Couldn't decrypt config/credentials.yml.enc. Perhaps you passed the wrong key?
Run Code Online (Sandbox Code Playgroud)

可能是什么问题呢?

ruby-on-rails amazon-s3 amazon-web-services ruby-on-rails-6

10
推荐指数
1
解决办法
5851
查看次数