Merge pull request #33 from shubham149/ssh_key

Added DRONE_SSH_KEY for ssh key environment variable
This commit is contained in:
Brad Rydzewski 2020-11-06 09:19:05 -05:00 committed by GitHub
commit 3f12c6de5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,9 +19,9 @@ fi
# the ssh key and add the netrc machine to the # the ssh key and add the netrc machine to the
# known hosts file. # known hosts file.
if [[ ! -z "${SSH_KEY}" ]]; then if [[ ! -z "${DRONE_SSH_KEY}" ]]; then
mkdir /root/.ssh mkdir /root/.ssh
echo -n "$SSH_KEY" > /root/.ssh/id_rsa echo -n "$DRONE_SSH_KEY" > /root/.ssh/id_rsa
chmod 600 /root/.ssh/id_rsa chmod 600 /root/.ssh/id_rsa
touch /root/.ssh/known_hosts touch /root/.ssh/known_hosts