From 7cc24f29ffaeed38d0539245c67b2b74e38e33cd Mon Sep 17 00:00:00 2001 From: Valentin Lab Date: Tue, 15 Oct 2019 13:15:00 +0200 Subject: [PATCH] new: [pandachi-install] myceliandre docker registry and git access. --- bin/pandachi-install | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/bin/pandachi-install b/bin/pandachi-install index 9b715ee..9f9a430 100755 --- a/bin/pandachi-install +++ b/bin/pandachi-install @@ -59,6 +59,30 @@ PGHOST=\$(docker-ip | grep postgres | xargs echo | cut -f 3 -d " ") || { export PGHOST PGUSER EOF +if ! [ -s /etc/ssh/vm_git_myceliandre_access_id_rsa ]; then + curl https://docker.0k.io/get/vm_git_myceliandre_access_id_rsa > /etc/ssh/vm_git_myceliandre_access_id_rsa || { + echo "Fatal: Could not retrieve http://docker.0k.io/get/vm_git_myceliandre_access_id_rsa ..." >&2 + rm -f /etc/ssh/vm_git_myceliandre_access_id_rsa + exit 1 + } + ## Not so usefull as it is public ! + chmod 0600 /etc/ssh/vm_git_myceliandre_access_id_rsa +fi + +mkdir -p /root/.ssh + +cat <> /root/.ssh/config + +Host git.myceliandre.fr + User git + IdentityFile /etc/ssh/vm_git_myceliandre_access_id_rsa + UserKnownHostsFile /dev/null + StrictHostKeyChecking no + Port 5022 + +EOF + + ## ## We could need some docker-compose for some quick hacks ##