Quicktip: Working with base64 in the shell

Recently I found myself looking on some base64 encoded values while debugging.
I had an assumption about inputs and wanted to tell if the string I was looking at was the correct base64 encoded representation of those inputs.
I needed a quick answer and I did not want to use one of the base64 encoders/decoders that are available online.
Turns out with Bash (or Cygwin, if you use Windows) you have everything you need for this simple task:

$ echo -n "param1:param2" | base64
cGFyYW0xOnBhcmFtMg==
$ echo -n "cGFyYW0xOnBhcmFtMg==" | base64 -d
param1:param2

Just be sure to add -n option for echo, otherwise a newline is added and encoded!

Integrating GitBlit with Directory Server

Make use of DSM Directory Server as Gitblit authentication provider

I did describe how to turn your DiskStation into a self-hosted Git server in the past, but I wanted to push things a little further and so I started experimenting with DSM’s Directory Server. Read along to find out how to manage users in Directory Server and set it up as authentication provider for GitBlit. Continue reading “Integrating GitBlit with Directory Server”