try and error
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user