Skip to content
Snippets Groups Projects
Commit 07ab43ea authored by Alexandre Gravereaux's avatar Alexandre Gravereaux
Browse files

fix-deploy-13

parent 59a0a520
No related branches found
No related tags found
No related merge requests found
Pipeline #53975 failed
......@@ -46,14 +46,26 @@ deploy:
variables:
SSH_KEY: "$SSH_PRIVATE_KEY"
DOMAIN: 138.195.139.69
# before_script:
# - 'which ssh-agent || ( apk update && apk add openssh-client )'
# - mkdir -p ~/.ssh
# - echo "$SSH_KEY" | tr -d '\n' > ~/.ssh/id_ed25519
# - chmod 600 -R ~/.ssh
# - eval $(ssh-agent -s)
# - ssh-add ~/.ssh/id_ed25519 # erreur de libcrypto avec l'agent ssh
# - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
before_script:
- 'which ssh-agent || ( apk update && apk add openssh-client )'
- mkdir -p ~/.ssh
- echo "$SSH_KEY" | tr -d '\n' > ~/.ssh/id_ed25519
- chmod 600 -R ~/.ssh
- 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client wget gnupg -y )'
- wget -qO- https://get.docker.com/gpg | apt-key add -
- eval $(ssh-agent -s)
- ssh-add ~/.ssh/id_ed25519 # erreur de libcrypto avec l'agent ssh
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh
- touch ~/.ssh/config
- touch ~/.ssh/known_hosts
- chmod -R 400 ~/.ssh
- ssh-keyscan <ip> >> ~/.ssh/known_hosts
- '[[ -f /.dockerinit ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
script:
- ssh debian@$DOMAIN "
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment