👷 Add ssh config
This commit is contained in:
1 parent
42f23b1d77
commit
b79d9fc9c8
1 file changed
+11
@@ -29,6 +29,17 @@ lint:
|
|||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
before_script:
|
||||||
|
# Install ssh if not already
|
||||||
|
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
|
||||||
|
- eval $(ssh-agent -s)
|
||||||
|
# Make SSH key available
|
||||||
|
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
|
||||||
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
# Add known host keys
|
||||||
|
- echo "$SSH_KNOWN_HOSTS" >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
script:
|
script:
|
||||||
- ssh gitdeploy@dreamcast.neuf.no "$(< bin/deploy)"
|
- ssh gitdeploy@dreamcast.neuf.no "$(< bin/deploy)"
|
||||||
only:
|
only:
|
||||||
|
|||||||
Reference in new issue
Block a user