简体   繁体   English

Ruby on Rails secrets.yml没有添加到.gitignore吗?

[英]Ruby on Rails secrets.yml not added to .gitignore?

If Rails 4+ has secret.yml , where you can store API keys, why doesn't it automatically be added to the .gitignore file? 如果Rails 4+具有secret.yml ,您可以在其中存储API密钥,为什么不将其自动添加到.gitignore文件中?

This is what my file looks like when creating a new app: 这是创建新应用程序时文件的外观:

# Ignore bundler config.
/.bundle

# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal

# Ignore all logfiles and tempfiles.
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep

# Ignore Byebug command history file.
.byebug_history

(by the way, I'm trying out Rails 5, but I think this question still applies) (顺便说一下,我正在尝试Rails 5,但我认为这个问题仍然适用)

Its not added to .gitignore automatically. 它不会自动添加到.gitignore If you want you can add it yourself though. 如果需要,您可以自己添加。

Here is an article with additional information about secret.yml which might be of any use. 这是一篇有关secret.yml 附加信息文章 ,可能有用。

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

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