You want to setup your own git server and connect to through SSH? Moreover you want it to be nice and smooth? Welcome aboard.
Nowadays I am busy but will be back with some things to read for people who are interested in the state of the science in anti-malware studies.
For one of my past projects, I had the chance to work with GnuPG and Java. I used the Bouncy Castle framework to manage the PGP key management and GnuPG in order to encrypt the content which was an email. In this post, I am willing to explain some tricks that I figured out during the GnuPG encryption.