This commit is contained in:
parent
9e0a8292c2
commit
e6e61314c5
1 changed files with 5 additions and 0 deletions
|
|
@ -13,9 +13,14 @@ steps:
|
||||||
image: *GIT_VERSION
|
image: *GIT_VERSION
|
||||||
commands:
|
commands:
|
||||||
- mkdir -p ~/.ssh
|
- mkdir -p ~/.ssh
|
||||||
|
- chmod 700 ~/.ssh
|
||||||
|
# Create the SSH key file
|
||||||
- echo "${SSH_KEY}" > ~/.ssh/id_ed25519
|
- echo "${SSH_KEY}" > ~/.ssh/id_ed25519
|
||||||
- chmod 600 ~/.ssh/id_ed25519
|
- chmod 600 ~/.ssh/id_ed25519
|
||||||
- ssh-keyscan -t ed25519 git.polarolouis.fr >> ~/.ssh/known_hosts
|
- ssh-keyscan -t ed25519 git.polarolouis.fr >> ~/.ssh/known_hosts
|
||||||
|
- chmod 644 ~/.ssh/known_hosts
|
||||||
|
# Set the GIT_SSH_COMMAND to use the SSH key
|
||||||
|
- export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_ed25519 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
|
||||||
# Clone the repository via HTTPS inside a new directory
|
# Clone the repository via HTTPS inside a new directory
|
||||||
- git clone "${CI_REPO_CLONE_SSH_URL}" "${CI_COMMIT_SHA}"
|
- git clone "${CI_REPO_CLONE_SSH_URL}" "${CI_COMMIT_SHA}"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue