Add support for GPG signing

This commit is contained in:
Patrick Lühne 2017-11-20 00:11:28 +01:00
parent 5d06d0127c
commit 1d27a3246c
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF
2 changed files with 10 additions and 3 deletions

View File

@ -59,8 +59,13 @@ def initRepo(config):
git(["clone", config["storage"]["remote"], dataDir], None) git(["clone", config["storage"]["remote"], dataDir], None)
# default settings # default settings
git(["config", "--local", "user.name", config["storage"]["user"]], dataDir) git(["config", "--local", "user.name", config["storage"]["userName"]], dataDir)
git(["config", "--local", "user.email", config["storage"]["userEMail"]], dataDir) git(["config", "--local", "user.email", config["storage"]["userEMail"]], dataDir)
if "userSigningKey" in config["storage"]:
git(["config", "--local", "user.signingkey", config["storage"]["userSigningKey"]], dataDir)
git(["config", "--local", "commit.gpgsign", "true"], dataDir)
else:
git(["config", "--local", "commit.gpgsign", "false"], dataDir) git(["config", "--local", "commit.gpgsign", "false"], dataDir)
# fetch origin # fetch origin

View File

@ -4,9 +4,11 @@ storage:
# repote Git repository URL # repote Git repository URL
remote: git@git.luehne.de:patrick/tplp-planning-benchmark.git remote: git@git.luehne.de:patrick/tplp-planning-benchmark.git
# user name for commits # user name for commits
user: potassco-bot userName: potassco-bot
# user e-mail for commits # user e-mail for commits
userEMail: bot@potassco.org userEMail: bot@potassco.org
# user GPG key for signing commits (optional)
# userSigningKey: 12345678
# data branches # data branches
branches: branches:
results: results results: results