blob: 2e26668fec3df276ba5122abf4042f57d5d8a6ba (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/env bash
set -e
# Ensure we are jenkins user
if [ "$EUID" -ne 1006 ]
then echo "Please run as jenkins"
exit
fi
if [ -f ~/.gnupg/pubring.kbx ]; then
echo "GnuPG Keypair has already been generated."
else
echo "Generating GnuPG keypair..."
gpg --batch --gen-key > /dev/null 2>&1 <<EOF
%no-protection
Key-Type:1
Key-Length:3072
Subkey-Type:1
Subkey-Length:3072
Name-Real: VyOS Unofficial Signing Key
Name-Email: signing@not-vyos.org
Expire-Date:0
EOF
fi
|