为什么我不能使用现成的凭据? [英] Why I can not use a ready-made credentials?

查看:123
本文介绍了为什么我不能使用现成的凭据?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用服务器上的现成凭证。

I want to use ready-made credential, that are on my server.

我执行 EDITOR = nano --wait bin / rails凭据:edit

然后,我用我文件中这些文件中的内容替换certificate.yml.enc和master.key的内容服务器。
但是当我尝试读取凭据时,出现错误无法解密config / credentials.yml.enc。也许您传递了错误的密钥?

Then I replace the contents of credentials.yml.enc and master.key with the ones inside these files on my server. But when I try to read credentials I get an error Couldn't decrypt config/credentials.yml.enc. Perhaps you passed the wrong key?

推荐答案

错误说明了一切:使用您的凭据文件服务器上,您应该在 config / master.key 文件中具有相同的密钥(或 RAILS_MASTER_KEY env变量,具体取决于您设置)

Error says it all: to use credentials files from your server, you should have same key in config/master.key file (or RAILS_MASTER_KEY env variable, depending on how you set it)

这篇关于为什么我不能使用现成的凭据?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆