From 7f32673fef26629e76b5f21649ffced45fa49058 Mon Sep 17 00:00:00 2001 From: Mark Milligan Date: Sun, 20 Mar 2022 08:57:16 -0500 Subject: [PATCH] chore: add ssh-keyscan to configure script example when git cloning --- images/configure.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/images/configure.md b/images/configure.md index a2e114af0..7e606542f 100644 --- a/images/configure.md +++ b/images/configure.md @@ -46,12 +46,16 @@ file shows how you can clone a repo at build time: #!/bin/bash if [ ! -d "/home/coder/workspace/project" ] then +ssh-keyscan -t rsa >> ~/.ssh/known_hosts git clone git://company.com/project.git /home/coder/workspace/project else echo "Project has already been cloned." fi ``` +> Change the git provider endpoint in the ```ssh-keyscan``` command. e.g., +> ```github.com``` ```bitbucket.org``` ```gitlab.com``` + Note that the instructions provided include `if-else` logic on whether the instructions should be re-run (and when) or if Coder should run the instructions only once. We strongly recommend including this logic at all times to minimize