gpg-encrypt credentials.json instead

master
Yorick van Pelt 2019-05-18 20:05:20 +02:00
parent 67bdb9f84c
commit 4c4d03adef
Signed by: yorick
GPG Key ID: A36E70F9DC014A15
8 changed files with 3 additions and 10 deletions

View File

@ -1,3 +0,0 @@
# Do not edit this file. To specify the files to encrypt, create your own
# .gitattributes file in the directory where your files are.
* !filter !diff

View File

@ -1,2 +0,0 @@
„^ž¥ƒ¹—œ_@SÞÜÊÌØ—&m*„K‰-NZâݺ÷OŠ °ÿâR0ý.ÞMX_Q£ëqŽÜ®tÎá\îû;j`¢ºD¦]?ÿ%
·\t„õ9¿ÃÜfÚÏÒÀï6=œU=œz µÌw¤ì7C³¨Ò`nD*Òu«§y•ÙÃQ·³ »ä[éÂ}»T¨†dHVÉ`CMÄɶO Í`©è]3 ¸N‡_ïNLüx¾­LA°{Ü{<7B>ClÜÄ¿üͽ1TPº}ù7ÝYLiAbX•çN]\iL<69> ¢ý’Û]óþ::@ÇÃYˆ¶^¡jC5toñÆðG>¼¶î]t¼*9wþˆáÕÙK.•Ê™Ùa¨Áö0<30>¯

1
.gitattributes vendored
View File

@ -1 +0,0 @@
credentials.json filter=git-crypt diff=git-crypt

View File

@ -1,4 +1,3 @@
```bash ```bash
git crypt unlock bin/skl-auto-payslip.js auto <hours>
node index.js auto <hours>
``` ```

Binary file not shown.

BIN
credentials.json.gpg Normal file

Binary file not shown.

View File

@ -27,8 +27,8 @@ const config = {
} }
async function authAll() { async function authAll() {
const content = await readFile('credentials.json') const {stdout, stderr} = await exec(`gpg --decrypt < ${__dirname}/credentials.json.gpg`)
return authorize(JSON.parse(content)) return authorize(JSON.parse(stdout))
} }
async function authorize(credentials) { async function authorize(credentials) {