Skip to content

Commit 98def2b

Browse files
authored
chore: add ssh-keyscan to configure script example when git cloning (#913)
1 parent 2f6fe18 commit 98def2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

images/configure.md

+4
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,16 @@ file shows how you can clone a repo at build time:
4646
#!/bin/bash
4747
if [ ! -d "/home/coder/workspace/project" ]
4848
then
49+
ssh-keyscan -t rsa <your git provider endpoint> >> ~/.ssh/known_hosts
4950
git clone git://company.com/project.git /home/coder/workspace/project
5051
else
5152
echo "Project has already been cloned."
5253
fi
5354
```
5455

56+
> Change the git provider endpoint in the ```ssh-keyscan``` command. e.g.,
57+
> ```github.com``` ```bitbucket.org``` ```gitlab.com```
58+
5559
Note that the instructions provided include `if-else` logic on whether the
5660
instructions should be re-run (and when) or if Coder should run the instructions
5761
only once. We strongly recommend including this logic at all times to minimize

0 commit comments

Comments
 (0)