@guanghechen/tool-git-cipher v6.0.0-alpha.21
Fully encrypt the git repository
Prepare a directory
plaintextRootDir, which tracks (or uses it as the source repository directly) the git repository to be encrypted. Every time the encrypt command is executed, the content under the pathplaintextRootDirwill be encrypted and stored into directoryciphertextRootDir, and the structure of the file will be saved inindexFilepath.Support incremental update content, determine whether the file needs to be re-encrypted by comparing the latest modified time of the source file.
The secret key to encrypt the
plaintextRootDirdirectory is encrypted by a password entered by the user and saved in thesecretConfigPathfile. This file also saves the encrypted result of the mac value of the original key, which is used to verify whether the subsequent input password is correct.Default algorithm
AES-256 gcm.
Install
npm
npm install -g @guanghechen/tool-git-cipheryarn
yarn global add @guanghechen/tool-git-cipher
Examples
Basic:
You can specify configs into
package.jsonlike below:{ "name": "private-repository-demo", "version": "0.0.0", "private": true, "scripts": { "encrypt": "ghc-git-cipher encrypt .", "decrypt": "ghc-git-cipher decrypt ." }, "devDependencies": { "@guanghechen/tool-git-cipher": "^4.0.0-alpha.3" }, "@guanghechen/tool-git-cipher": { "__globalOptions__": { "catalogConfigPath": "ghc-crypt/.ghc-catalog", "cryptRootDir": "ghc-crypt", "encoding": "utf8", "CRYPT_FILES_DIR": "encrypted", "cryptFilepathSalt": "", "keepIntegrity": [ ".gitignore", ".npmrc", ".nvmrc", ".yarnrc", "package.json", "yarn.lock", ".ghc-secret" ], "keepPlainPatterns": [ ".gitignore", ".npmrc", ".nvmrc", ".yarnrc", "package.json", "yarn.lock", ".ghc-secret" ], "logLevel": "info", "minPasswordLength": 6, "PART_CODE_PREFIX": ".ghc-part", "pbkdf2Options": { "salt": "guanghechen", "digest": "sha256", "iterations": 100000, "keylen": 32 }, "secretConfigPath": ".ghc-secret", "showAsterisk": true }, "encrypt": { "catalogCachePath": ".ghc-catalog.cache.json" }, "decrypt": {} } }While
__globalOptions__is the global option,encryptis the option for the sub-commandencryptand etc.
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
3 years ago
2 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago