HiromuHota / pdi-git-plugin

SpoonGit allows you to manage versions of local Kettle files without leaving Spoon. In addition to Git, Subversion is also supported.
Apache License 2.0
29 stars 12 forks source link

prevent commit of security related information #8

Closed RutgerDOW closed 7 years ago

RutgerDOW commented 7 years ago

Hello Hiromu, I spoke to you at PCM17, about your great git implementation in pdi.

Here is the information of Jens i mentioned: pdikettle-solution-share

We self use a 2 convenience script before commit: checks for passwords en keys in ktr/kjb: every value string starting with "Encrypted " every xml tag with "password" (case insensitive) *every xml tag with "private" (case insensitive) and CDATA in value

clear all (shared) connection data from ktr/kjb (just to keep files small, the informatie is automatically added by pdi when opening/using file with info from shared.xml)

Maybe this can be done by git hooks in your project? Or by some user configuration with predefined options what not to include/exclude in file before commit

HiromuHota commented 7 years ago

Hi Rutger,

Thanks for your great feedbacks!

I think you can trigger those scripts by git hooks. According to Bug 493721, "Currently (as of 2016-05-16) JGit supports the following hooks on Posix and cygwin : pre-commit, commit-msg, pre-push" Please install your scripts under .git/hooks of your local repository and tell me how it goes.

And also please share the scripts if possible for the benefit of others.

HiromuHota commented 7 years ago

I tried pre-commit hook and confirmed that pre-commit is hooked by commit. screen shot 2017-11-22 at 4 26 55 pm