Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
0
Help us understand the problem. What is going on with this article?
@kazumawada

[Rails] credentials.yml.enc、master.keyについて。

結論

秘密鍵: master.key

公開鍵: credentials.yml.enc

master.keyとは

・暗号化された「credentials.yml.enc」の記述を復号化するための鍵のようなもの

・アプリを消して、同じものをクローンした時点で、無くなっているから、credential.yml.encを再生成する必要がある。

[Rails] ActiveSupport::MessageEncryptor::InvalidMessageの解決方法

credentials.yml.encとは

中身はこんな感じで暗号化されている

LEebK7Oel2pwADz3qzaLXWYHR12UexPU097wLK9FPnnRjZXPY7ZtSBsr96yCcC5r3dKRZrzzvwkmHO7hmuMgF+fiEOEWczncvQ50XuqMC2GDXiAsK0AyuF59eJ7EzzjiYT6FLS9Hvqk8W6IKHvFRf6BsgmVjGKVhp6KIyCeU/wzTpI5s75cl4ahn1CUCfLsxjXeGKFxlYIdgFgi1h+bYPhFPs2EVagdDHir/g2pWlofJkCAdbuJFstA/qNc40mC3Pb8DPoCP1HGCXDMPGrOPSPpEefJhw2lHj5l5TOvcRWNh5q0+fjhgrUbEGD/R+uu4VqSDVXQ+eNUvS5BQbGK/09L/woCq3zz8Wg77KV53TD2uuYV83bTYTWtOvcegd4jfJFBu8i5GfTBC2yO

暗号とくとこんな感じ

# aws:
#   access_key_id: 123
#   secret_access_key: 345

# Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
secret_key_base: 8be8e637d755f79c799048bed8be0c...

編集するコマンド

EDITOR="vi" bin/rails credentials:edit

もっと詳しく
https://zenn.dev/banrih/articles/f22f0a70bbead2a02110

0
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
0
Help us understand the problem. What is going on with this article?