From 83d3ac97b8758c30ba11a6698be0e40e095a3e57 Mon Sep 17 00:00:00 2001 From: Imran Ismail Date: Fri, 3 Apr 2020 12:16:30 +0800 Subject: [PATCH] chmod .netrc to private netrc gem checks for permissions and drone-runner-docker creates the file with 644 permission ``` Netrc::Error: Permission bits for '/root/.netrc' should be 0600, but are 644 ``` --- engine/compiler/shell/shell.go | 1 + 1 file changed, 1 insertion(+) diff --git a/engine/compiler/shell/shell.go b/engine/compiler/shell/shell.go index 2f6aa26..aad15ab 100644 --- a/engine/compiler/shell/shell.go +++ b/engine/compiler/shell/shell.go @@ -36,6 +36,7 @@ func Script(commands []string) string { const optionScript = ` if [ ! -z "${DRONE_NETRC_FILE}" ]; then echo $DRONE_NETRC_FILE > $HOME/.netrc + chmod 600 $HOME/.netrc fi unset DRONE_SCRIPT