Git can sign a flag with the -x command and pulls the cert from the repositories root directory currently must be named mycert.pem. The signed s/mime message is printed to stdout.