Installing the BluBracket CLI Tool is simple! Download the tool from your Community Edition portal and follow the instructions below.
Windows Installation
Extract the files into any directory that is available in PATH.
For example, into the git installation folder, "C:\Program Files\Git\cmd"
Verify the installation
C:\Users\vbuzu>blubracket --version blubracket 2021-01-14-42f4dfe2c2abef161ee5066b0b774b41832c7c51
Setting up git hooks for Windows
In your terminal,
cd
to your repository directory, then runblubracket install-git-hooks
C:\Users\vbuzu\projects\sandbox>blubracket install-git-hooks Successfully installed pre-commit hook to 'C:/Users/vbuzu/projects/sandbox/.git/hooks/pre-commit'
NOTE:
If git is setup to use global git hooks (specified by
core.hooksPath
git config), CLI will update/install the hook in that global folder.Currently BluBracket CLI will set only one hook,
pre-commit
.
macOS Installation
The macOS .pkg will automatically install the app into the
/Applications/BluBracket
folder (or the~/Applications/BluBracket
folder if you selected install for me only).Open a terminal and add the BluBracket path to your bash profile:
If you selected Install for all users of this computer
echo 'export PATH="/Applications/blubracket:$PATH"' >>~/.bash_profile source ~/.bash_profile
Alternatively, if you selected Install for me only
echo 'export PATH="~/Applications/blubracket:$PATH"' >>~/.bash_profile; source ~/.bash_profile
If your IDE is open you may need to restart it in order to pick up the new bash profile changes.
Verify the installation
% blubracket --version blubracket 2021-01-14-42f4dfe2c2abef161ee5066b0b774b41832c7c51
Setting up git hooks on macOS
In your terminal,
cd
to your repository directory, then runblubracket install-git-hooks
% blubracket install-git-hooks Successfully installed pre-commit hook to '/Users/vbuzu/sandbox/.git/hooks/pre-commit'
NOTE:
If git is setup to use global git hooks (specified by
core.hooksPath
git config), BluBracketCLI will update/install the hook in that global folder.Currently BluBracket CLI will set only one hook,
pre-commit
.
Linux Installation
Extract the file into any directory that is available in PATH.
Please follow instructions from step 2 onwards in macOS section above.
Try out the BluBracket CLI commit hook
In your terminal,
cd
to your repository directoryThen add the following example secret into any file in your repository:
myPassword="My$uperDuperS3cret!"
Now try to commit your change with git commit - your new BluBracket CLI hook should prevent the commit from happening.
Comments
0 comments
Please sign in to leave a comment.