Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

606
Views
Couldn't decrypt config/credentials.yml.enc. Perhaps you passed the wrong key?

I recently deleted my local project but did a git clone and picked up from where I last committed. As I tried to upload images to AWS, which was already configured, I got this error:

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

I tried to look at my credentials.yml file for any error but when I input this command:

EDITOR="code --wait" rails credentials:edit

...I get this error:

Couldn't decrypt config/credentials.yml.enc. Perhaps you passed the wrong key?

What could be the problem?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You are missing the master.key

When you create a new project, rails will setup the credentials.yml.enc and a matching master.key file to access the credentials. The master.key file will also automatically be added to the gitignore, so if you delete your project local and clone it again your master.key will be lost.

The only way to fix this is by setting up new credentials.yml.enc and add your AWS credentials to it again.

First you need to remove the existing credentials.yml.enc and then run: rails credentials:edit to create a new one.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!