我需要关于如何使用Cloud9访问和编辑我的Rails5.2 credentials.yml.enc文件的帮助。
我已经使用EDITOR=“something--wait”格式尝试了几个不同的命令,但每次输入rails credentials:edit时,都会得到这样的错误:“No $EDITOR to open file in”。
有什么建议或帮助吗?
我已经生成了简单的rails api应用程序,而且我对Rails.application.secrets.secret_key_base有问题--它是nil。我要在本地的机器上启动它。根据的说法,一切都应该很好。我有合适的app/config/credentials.yml.enc。当我尝试用rails credentials:edit编辑它时,它会正确地编辑。其实际内容是
# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
secret_key_b
我刚刚完成了通过5.2将Rails应用程序从5.1.6.2升级到6.0.0的步骤(我选择在6.0.0之前才考虑凭据问题,以防最终意味着我必须想出两次新的凭据)。
在升级时,我一直在看一些关于如何使用新凭据的指南,但是他们都觉得自己错过了最后一步,或者我误解了什么。在我的本地开发环境中,完全不进行凭据升级似乎不会造成任何问题,但是当试图部署到生产env (Convox/AWS)时,我得到了以下错误:
Missing encryption key to decrypt file with. Ask your team for your master key and write it to /app
在从rails 5.1升级到rails 5.2.3之后,我将收到这个弃用警告:
secrets.secret_token` is deprecated in favor of `secret_key_base` and will be removed in Rails 6.0. (called from <main> at /config/initializers/stripe.rb:3
如果我看一下条形初始化器,我有:
Rails.configuration.stripe = {
publishable_key: Rails.application.secrets.strip
这个问题的现有解决方案无济于事。 Rails:5.2 ruby:2.4.1 pg:0.18 This is the query from the rails log:
INSERT INTO "users" ("first_name") VALUES ('\xC3\r\x04\t\x03\x02qlF\xA4\.....') 使用active_record-pgcrypto gem对first_name值进行加密 first_name是users表中的string数据类型 在pgAdmin中复制粘贴查询效果良好。但是应用程序抛出错误。
试图找出如何强制命令行git使用Github令牌。如果我用用户名和令牌(如git clone https://<user>:<mytoken>@git.web.com/organization/repository)克隆存储库,那么一切都很好。
当我试图在没有用户名或令牌的情况下进行克隆时,操作失败时会出错:
remote: Password authentication is not available for Git Operations.
remote: You must use a personal access token or SSH key.
我想把它藏在