feat(ssh-key): add generate-ssh-key script and update entrypoint for shallow clones and submodule depth
This commit is contained in:
4 files changed
+28
-14
No files matched your search
Executable
+11
@@ -0,0 +1,11 @@
|
||||
#!/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)
|
||||
}
|
||||
Reference in new issue
Block a user