We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 58bacd6 + 86fd28e commit 2bc55c7Copy full SHA for 2bc55c7
1 file changed
create-a-deploy-key.sh
@@ -4,9 +4,15 @@
4
# POST /repos/{owner}/{repo}/keys
5
#
6
7
-public_key_file=${1:-${my_ssh_pub_key}}
8
-public_key=$(cat ${public_key_file})
9
ts=$(date +%s)
+ssh_key_file=tmp/key_${ts}
+ssh_public_key_file=tmp/key_${ts}.pub
10
+rm -f ${ssh_key_file} ${ssh_public_key_file}
11
+key_type=rsa
12
+
13
+ssh-keygen -t ${key_type} -f ${ssh_key_file} -q -N '' -C "pwr-admin-ssh-${ts}"
14
+ssh-keygen -l -v -f ${ssh_public_key_file}
15
+public_key=$(cat ${ssh_public_key_file})
16
17
json_file=tmp/create-a-deploy-key.json
18
0 commit comments