From ed8f1bf5921eec2ddade30b5903a4909c6eb3622 Mon Sep 17 00:00:00 2001 From: Lubos Racansky Date: Fri, 13 Oct 2023 17:33:22 +0200 Subject: [PATCH] ssh_agent.sock --- .github/workflows/scp-deploy.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/scp-deploy.yml b/.github/workflows/scp-deploy.yml index 66c16a3b..54691e56 100644 --- a/.github/workflows/scp-deploy.yml +++ b/.github/workflows/scp-deploy.yml @@ -23,22 +23,23 @@ jobs: env: INTERNAL_USERNAME: ${{ secrets.JFROG_USERNAME }} INTERNAL_PASSWORD: ${{ secrets.JFROG_PASSWORD }} - - name: Retrieve the certificate and store it to a file + - name: Setup SSH Keys and known_hosts run: | - echo "${{ secrets.SCP_CERTIFICATE }}" > cert.pem + ssh-agent -a /tmp/ssh_agent.sock > /dev/null + ssh-add - <<< "${{ secrets.SCP_CERTIFICATE }}" - name: Deploy enrollment-server.war shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war + scp -o 'StrictHostKeyChecking no' enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server.war - name: Deploy enrollment-server-onboarding.war shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war + scp -o 'StrictHostKeyChecking no' enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding.war - name: Deploy enrollment-server.war mock shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-mock.war + scp -o 'StrictHostKeyChecking no' enrollment-server-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-mock.war - name: Deploy enrollment-server-onboarding.war mock shell: bash run: | - scp -o 'StrictHostKeyChecking no' -i cert.pem enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war + scp -o 'StrictHostKeyChecking no' enrollment-server-onboarding-wultra-*.war ${{ secrets.SCP_USERNAME }}@${{ secrets.SCP_HOST }}:/opt/apache-tomcat/webapps/enrollment-server-onboarding-mock.war