Git存储库中的文件加密 [英] File encryption in Git Repository
问题描述
是否有任何方式(内置或附加)对存储库中的单个文件进行加密,只有有限的人员才能访问.这些人签入时,文件将在签出时自动加密和解密.如果试图被其他人访问,它们将保持加密状态.
Is there any way (in built or add-on) to encrypt individual files in a repository, accessible by limited people. Files when checked in by those folks will auto encrypt and decrypt when checked out. They will stay encrypted if tried to be accessed by other people.
推荐答案
我知道我的答案已经很晚了,但是在git repos中存储秘密的方法有很多:
I know my answer is late but there is plenty of alternatives for storing secrets in git repos:
- Git-crypt
- BlackBox
- SOPS
- Transcrypt
其中大多数使用GNU Privacy Guard(GPG),对称密钥加密和/或云密钥服务(SOPS).如果您只想使用密码简单的加密机制,还可以查看 ansible保管库,不需要为每个帐户生成密钥.
Most of them use GNU Privacy Guard (GPG), symmetric key encryption, and/or cloud key services (SOPS). If you just want a simple encryption mechanism with password you can also take a look at ansible vault, which doesn't require generating keys for each account.
这篇关于Git存储库中的文件加密的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!