问题描述
我按照 this 教程使用 capistrano 和 ruby-mine 部署我的 rails 应用程序,需要一个步骤来生成加密的 credentials.yml.enc 并将其添加到 VCS,但我无法使用 ruby 添加它-我什至 git add 但是该文件不存在于 gitignore 文件中。
您会发现 gitignore 文件的以下内容,credentials.yml.enc 是 config 目录的一部分
>> find . -name ".gitignore" -exec cat {} +
/shelf/
/workspace.xml
/dataSources/
/dataSources.local.xml
/httpRequests/
/sassc
/sass-spec
VERSION
.DS_Store
.sass-cache
*.gem
*.gcno
.svn/*
.cproject
.project
.settings/
*.db
*.aps
GNUmakefile.in
GNUmakefile
/aclocal.m4
/autom4te.cache/
/src/config.h
/config.h.in
/config.log
/config.status
/configure
/libtool
/m4/libtool.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
/script/ar-lib
/script/compile
/script/config.guess
/script/config.sub
/script/depcomp
/script/install-sh
/script/ltmain.sh
/script/missing
/script/test-driver
/src/stamp-h1
/src/Makefile.in
/src/Makefile
libsass/*
*.o
*.lo
*.so
*.dll
*.a
*.suo
*.sdf
*.opendb
*.opensdf
a.out
libsass.js
tester
tester.exe
build/
config.h.in*
lib/pkgconfig/
bin/*
.deps/
.libs/
win/bin
*.user
win/*.db
sassc++
libsass.la
src/support/libsass.pc
sassc/
sass-spec/
installer
.idea
/bin
/.bundle
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3-*
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
/storage/*
!/storage/.keep
/public/assets
.byebug_history
/config/master.key
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
>> cat .gitignore
.idea
/bin
/.bundle
/db/*.sqlite3
/db/*.sqlite3-journal
/db/*.sqlite3-*
/log/*
/tmp/*
!/log/.keep
!/tmp/.keep
/tmp/pids/*
!/tmp/pids/
!/tmp/pids/.keep
/storage/*
!/storage/.keep
/public/assets
.byebug_history
/config/master.key
/public/packs
/public/packs-test
/node_modules
/yarn-error.log
yarn-debug.log*
.yarn-integrity
感谢任何帮助,提前致谢
解决方法
-
整个文件夹(及其 子目录)/扩展名 **.enc 被排除在 gitignore 中。
-
当您查看
git status
时文件是否存在。如果是,你会 在执行git add
之前需要git commit
该文件。 -
文件是否已经提交,但尚未推送?
这些是我头顶上的一些事情。请发布更多详细信息以进行挖掘!