delete key if exists
Some checks failed
continuous-integration/drone/push Build is failing
continuous-integration/drone Build is failing

This commit is contained in:
Patrick Michl 2022-02-20 23:09:33 +01:00
parent b2799fef2b
commit 00a498c1f5

View File

@ -19,6 +19,7 @@ steps:
- apk add -U openssh - apk add -U openssh
- wget -O- https://github.com/hetznercloud/cli/releases/latest/download/hcloud-linux-amd64.tar.gz | tar zx - wget -O- https://github.com/hetznercloud/cli/releases/latest/download/hcloud-linux-amd64.tar.gz | tar zx
- ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -q -N '' - ssh-keygen -t ed25519 -f /root/.ssh/id_ed25519 -q -N ''
- ./hcloud ssh-key delete drone || true
- ./hcloud ssh-key create --name drone --public-key-from-file /root/.ssh/id_ed25519.pub - ./hcloud ssh-key create --name drone --public-key-from-file /root/.ssh/id_ed25519.pub
- ./hcloud server enable-rescue $SERVER_ID --ssh-key drone - ./hcloud server enable-rescue $SERVER_ID --ssh-key drone
- ./hcloud server reset $SERVER_ID - ./hcloud server reset $SERVER_ID