Skip to content
Snippets Groups Projects
Commit 3528aa29 authored by Charlotte Hausman's avatar Charlotte Hausman
Browse files

Merge branch 'fix-ssh-weirds' into 'main'

try chmoding key

See merge request !1465
parents bb490cf5 9ad6a902
No related branches found
Tags end-of-sprint-18 end-of-sprint-18.5
1 merge request!1465try chmoding key
Pipeline #11950 passed
Pipeline: workspaces

#11952

    ......@@ -15,6 +15,7 @@
    #
    # You should have received a copy of the GNU General Public License
    # along with Workspaces. If not, see <https://www.gnu.org/licenses/>.
    import logging
    import socket
    from typing import Dict
    ......
    ......@@ -68,10 +68,11 @@ go-{go_name}-release:
    needs: ["go-{go_name}-build"]
    before_script:
    - mkdir -p ~/.ssh
    - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
    - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
    - eval $(ssh-agent -s)
    - chmod 400 "$SSH_PRIVATE_KEY"
    - ssh-add "$SSH_PRIVATE_KEY"
    - chmod 700 ~/.ssh
    - echo "$SSH_PRIVATE_KEY" | ssh-add - > ~/.ssh/id_rsa
    - '[[ -f /.dockerenv ]] && echo -e "Host *\\n\\tStrictHostKeyChecking no\\n\\n" > ~/.ssh/config'
    script:
    - echo "Releasing module to sbin area - {go_name}"
    ......
    ......@@ -3,10 +3,11 @@
    image: python:3.10-slim
    before_script:
    - mkdir -p ~/.ssh
    - 'which ssh-agent || ( apt-get update -y && apt-get install openssh-client -y )'
    - 'command -v ssh-agent >/dev/null || ( apt-get update -y && apt-get install openssh-client -y )'
    - eval $(ssh-agent -s)
    - chmod 400 "$SSH_PRIVATE_KEY"
    - ssh-add "$SSH_PRIVATE_KEY"
    - chmod 700 ~/.ssh
    - echo "$SSH_PRIVATE_KEY" | ssh-add - > ~/.ssh/id_rsa
    - '[[ -f /.dockerenv ]] && echo -e "Host *\\n\\tStrictHostKeyChecking no\\n\\n" > ~/.ssh/config'
    script:
    - mkdir -p /home/ssa/bin
    ......
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment