try and error

This commit is contained in:
Sven Jorns
2023-06-18 12:31:48 +03:00
parent 9542fd7f20
commit d93315baab
2 changed files with 8 additions and 3 deletions
+3 -1
View File
@@ -5,6 +5,7 @@
IDLE_TIME=${IDLE_TIME:-86400}
LOCALUSER=${LOCALUSER:-swsuser}
LOCALGROUP=${LOCALGROUP:-swsgroup}
export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_ed25519"
getOrCreateSshKeys() {
#user is root
@@ -46,7 +47,8 @@ else
cp /run/secrets/id_ed25519.pub ~/.ssh/id_ed25519.pub
chown "${LOCALUSER}:${LOCALGROUP}" ~/.ssh/id_ed25519
chown "${LOCALUSER}:${LOCALGROUP}" ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/id_ed25519.pub
chmod 600 ~/.ssh/id_ed25519
chmod 666 ~/.ssh/id_ed25519.pub
ls -la ~/.ssh/
else
+5 -2
View File
@@ -42,8 +42,6 @@ BASE_URL=${BASE_URL:-"http://docker.local:${SWSPORT}"}
# Zola output build and sws path
OUTPUT_DIR=${OUTPUT_DIR:-$HOME/$GITPROJECTUSER/$GITPROJECTNAME/public}
export GIT_SSH_COMMAND="ssh -i $HOME/.ssh/id_ed25519"
# set trap to exit this process
# at this time only exit this process if it get a exit code
trap "exit" EXIT
@@ -138,7 +136,12 @@ getTheme () {
fi
}
echo "Starting $_"
getOrCreateSshKeys
echo "Using git command: $GIT_SSH_COMMAND"
echo "Working directory:"
pwd
echo "put git server ${GITSERVER} to known hosts"
ssh-keyscan -p "${GITSERVERPORT}" -H "${GITSERVER}" >> ~/.ssh/known_hosts
zola --version