简体   繁体   English

如何在Rails 5中更改默认的secrets.yml文件

[英]How to change default secrets.yml file in Rails 5

I accidentally uploaded my secrets.yml file to Github. 我不小心将我的secrets.yml文件上传到了Github。 I changed my credentials and moved it to a new secrets_final.yml file that I've property setup in gitignore. 我更改了凭据并将其移动到新的secrets_final.yml文件中,该文件已在gitignore中进行了属性设置。 Problem now is unless I hardcode credentials, the environment variables don't seem to pull from this new file. 现在的问题是,除非我对凭据进行硬编码,否则环境变量似乎不会从该新文件中提取。

How do I change default secrets location? 如何更改默认机密位置?

I figured out how to get gitignore to stop tracking a file as when I added it to gitignore file, it still tracked file because it was cached. 当我将gitignore添加到gitignore文件时,我想出了如何使gitignore停止跟踪文件,但由于已对其进行缓存,因此它仍跟踪文件。 No need to change defaults secrets.yml - just remove cache and use same file. 无需更改默认值secrets.yml只需删除缓存并使用相同的文件即可。 Answer is here: https://stackoverflow.com/a/11451731/5551783 答案在这里: https : //stackoverflow.com/a/11451731/5551783

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM