File tree Expand file tree Collapse file tree
builder/rootfs/usr/local/src/slugbuilder/builder Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -69,6 +69,19 @@ export HOME="$app_dir"
6969export REQUEST_ID=$( openssl rand -base64 32)
7070export STACK=cedar-14
7171
72+ # # SSH key configuration
73+
74+ if [[ -n " $SSH_KEY " ]]; then
75+ mkdir -p ~ /.ssh/
76+ chmod 700 ~ /.ssh/
77+
78+ echo $SSH_KEY | base64 -d > ~ /.ssh/id_rsa
79+ chmod 400 ~ /.ssh/id_rsa
80+
81+ echo ' StrictHostKeyChecking=no' > ~ /.ssh/config
82+ chmod 600 ~ /.ssh/config
83+ fi
84+
7285# # Buildpack detection
7386
7487buildpacks=($buildpack_root /* )
@@ -87,18 +100,6 @@ if [[ -n "$BUILDPACK_URL" ]]; then
87100 committish=" master"
88101 fi
89102
90- if [[ -n " $SSH_KEY " ]]; then
91- mkdir -p ~ /.ssh/
92- chmod 700 ~ /.ssh/
93-
94- echo $SSH_KEY | base64 -d > ~ /.ssh/id_rsa
95- chmod 400 ~ /.ssh/id_rsa
96-
97- echo ' StrictHostKeyChecking=no' > ~ /.ssh/config
98- chmod 600 ~ /.ssh/config
99-
100- fi
101-
102103 set +e
103104 git clone --branch " $committish " --depth=1 " $url " " $buildpack " & > /dev/null
104105 SHALLOW_CLONED=$?
You can’t perform that action at this time.
0 commit comments