Merge pull request #33 from shubham149/ssh_key
Added DRONE_SSH_KEY for ssh key environment variable
This commit is contained in:
commit
3f12c6de5c
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user