[gnome-build-meta/abderrahim/update-refs-script: 4/5] test ssh key setup




commit cae3c7a1f2eac98f2283407788322759efdd9ebc
Author: Jordan Petridis <jordan centricular com>
Date:   Tue Oct 4 19:17:39 2022 +0200

    test ssh key setup

 .gitlab-ci.yml | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 088463be0..1edfa36b4 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -534,6 +534,19 @@ test-pinephone-pro-aarch64:
 update_refs:
   stage: 'track'
   script:
+    # Setup ssh
+    - eval $(ssh-agent -s)
+    - echo "$SSH_PRIVATE_KEY" | tr -d '\r' | ssh-add -
+    - mkdir -p ~/.ssh
+    - chmod 700 ~/.ssh
+
+    # FIXME: use static knownkeys with a var
+    # https://gitlab.com/gitlab-examples/ssh-private-key/-/blob/master/.gitlab-ci.yml#L38
+    - ssh-keyscan gitlab.gnome.org >> ~/.ssh/known_hosts
+    - chmod 644 ~/.ssh/known_hosts
+
+    - ssh -Tv git gitlab gnome org
+
     - git config --global user.email "sysadmin gnome org"
     - git config --global user.name "gnomebot"
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]