Skip to content

Commit

Permalink
more ssh cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjan Dikhoff committed Oct 25, 2024
1 parent e40b217 commit 42f4f57
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ DATE=`date`
WORK_DIR=`pwd`
REPORT_DIR="$WORK_DIR/build-report"
REPORT_FILE="$REPORT_DIR/index.html"
SSH_COMMAND="ssh -v"

GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ -n "$CF_PAGES" ]
Expand Down Expand Up @@ -59,22 +60,20 @@ cd $REPO_DIR
echo "Checking out $GIT_LIVE_BRANCH"
git checkout $GIT_LIVE_BRANCH

git config --global core.sshCommand "$SSH_COMMAND"
if [ -n "$CF_PAGES" ]
then
echo "We are on Cloudflare Pages. Setting custom ssh key and method"
mkdir ~/.ssh
echo "$BUILD_SSH_KEY" > ~/.ssh/id_cloudflare
echo "$BUILD_SSH_KEY_PUB" > ~/.ssh/id_cloudflare.pub
SSH_COMMAND="ssh -vvv"
# echo $SSH_COMMAND
echo "$BUILD_SSH_KEY" > ~/.ssh/id_ed25519
echo "$BUILD_SSH_KEY_PUB" > ~/.ssh/id_ed25519.pub
echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts

chmod 0600 ~/.ssh/id_cloudflare
chmod 0600 ~/.ssh/id_cloudflare.pub
chmod 0600 ~/.ssh/id_ed25519
chmod 0600 ~/.ssh/id_ed25519.pub
chmod 0644 ~/.ssh/known_hosts
chmod 0755 ~/.ssh

git config --global core.sshCommand "$SSH_COMMAND"
git config --global remote.origin.url [email protected]:Redot-Engine/redot-docs-live.git

insteadof=`git config --list | grep insteadof`
Expand All @@ -92,9 +91,9 @@ echo "#########################"
cat .git/config
echo "#########################"
ls -la ~/.ssh
cat ~/.ssh/id_cloudflare.pub
cat ~/.ssh/id_ed25519.pub
cat ~/.ssh/known_hosts
ssh -T -i ~/.ssh/id_cloudflare [email protected]
ssh -T [email protected]
echo "#########################"
git config --global core.pager cat
git config --list
Expand Down

0 comments on commit 42f4f57

Please sign in to comment.