Skip to content
Snippets Groups Projects
Commit fb433f7e authored by Florian Rhiem's avatar Florian Rhiem
Browse files

Use ~/.ssh/jutil_key when installing JUtil during CI

parent 9746daf8
No related branches found
No related tags found
No related merge requests found
...@@ -6,17 +6,18 @@ before_script: ...@@ -6,17 +6,18 @@ before_script:
# List installed stuff: # List installed stuff:
- apt list --installed - apt list --installed
####- pip install hyperspy tqdm cmocean nose ####- pip install hyperspy tqdm cmocean nose
# Run ssh-agent, "-s" forces generation of Bourne shell (/bin/sh) commands on stdout: # Create SSH configuration directory if necessary:
- eval $(ssh-agent -s) - mkdir -p --mode=700 ~/.ssh/
# Add SSH key for jutil to the agent store: # Add SSH key for jutil:
- echo "$SSH_KEY_JUTIL" - echo "$SSH_KEY_JUTIL" > ~/.ssh/jutil_key
- ssh-add <(echo "$SSH_KEY_JUTIL") - chmod 400 ~/.ssh/jutil_key
# Configure SSH to use ~/.ssh/jutil_key for iffgit.fz-juelich.de:
- echo -e "Host iffgit.fz-juelich.de\n\tIdentityFile ~/.ssh/jutil_key\n\n" > ~/.ssh/config
# For Docker builds disable host key checking. Be aware that by adding that # For Docker builds disable host key checking. Be aware that by adding that
# you are suspectible to man-in-the-middle attacks. # you are suspectible to man-in-the-middle attacks.
# WARNING: Use this only with the Docker executor, if you use it with shell # WARNING: Use this only with the Docker executor, if you use it with shell
# you will overwrite your user's SSH config. # you will overwrite your user's SSH config.
- mkdir -p ~/.ssh - '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" >> ~/.ssh/config'
- '[[ -f /.dockerenv ]] && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config'
- pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git - pip install git+ssh://gitlab@iffgit.fz-juelich.de/unger/jutil.git
- echo "Done" - echo "Done"
......
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