Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8310219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:22:57+00:00 2026-06-08T19:22:57+00:00

This is my config.yml file. In fact user_id, api_key and shared_secret are the same

  • 0

This is my config.yml file. In fact user_id, api_key and shared_secret are the same for each environment (development, test or production).

development:
  user_id: '1234'
  api_key: '1234'
  shared_secret: '43243'
  some_dev_data: 'fdsfdsfd'
test:
   some_test_data: 'rytr'

production:
   some_prod_data: 'hgf'

How do I make them independent from current environment? Or how to share them between all environments?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:22:59+00:00Added an answer on June 8, 2026 at 7:22 pm

    You can use anchors to pull out shared data:

    shared_stuff: &shared
      user_id: '1234'
      api_key: '1234'
      shared_secret: '43243'
    
    development:
      <<: *shared
      some_dev_data: 'fdsfdsfd'
    
    test:
      <<: *shared
      some_test_data: 'rytr'
    
    production:
      <<: *shared
      some_prod_data: 'hgf'
    

    Your values under shared_stuff are given the anchor name shared which you can then pull into your different environments.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Doctrine with Symfony2. My config.yml file looks something like this:- Doctrine
Im getting this error: FileLoaderLoadException: Cannot import resource app/config/security.yml from /app/config/config.yml. The file security.yml
This is my config/locales/en.yml file: # Sample localization file for English. Add more files
this is probably naive question: i have file config.yml which is in .gitignore file
This is my web.config file contents: <?xml version=1.0?> <configuration> <system.webServer> <httpErrors errorMode=Detailed /> <asp
My config file looks like this: title = myTitle; otherTitle = myOtherTitle; when I
i know that in config/en.yml I can change the message this email is already
I'm currently using an initializer to load a config.yml file into an AppConfig hash
I created a config/sphinx.yml file with the line: morphology: stem_en After running rake ts:config,
How could I get value from my config.yml file but not set as Twig

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.