11 lines
342 B
Bash
Executable File
11 lines
342 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
generate-ssh-key() {
|
|
echo 'Generate SSH private and public keys.'
|
|
mkdir -p tmp
|
|
if [[ ! -f "tmp/ed25519" ]]; then
|
|
ssh-keygen -t ed25519 -C admin@example.com -f tmp/ed25519 -N ''
|
|
fi
|
|
export GIT_SSH_PRIVATE_KEY=$(cat tmp/ed25519 | base64 -w0)
|
|
export GIT_SSH_PUBLIC_KEY=$(cat tmp/ed25519.pub)
|
|
} |