This commit is contained in:
@@ -46,10 +46,21 @@ jobs:
|
||||
ssh_home=$(mktemp -d)
|
||||
trap 'rm -rf "$ssh_home"' EXIT
|
||||
install -d -m 700 "$ssh_home/.ssh"
|
||||
printf '%s\n' "$NEURO_SSH_PRIVATE_KEY" > "$ssh_home/.ssh/id_ed25519"
|
||||
printf '%s\n' "$NEURO_SSH_KNOWN_HOSTS" > "$ssh_home/.ssh/known_hosts"
|
||||
chmod 600 "$ssh_home/.ssh/id_ed25519" "$ssh_home/.ssh/known_hosts"
|
||||
export HOME="$ssh_home"
|
||||
printf '%s\n' "$NEURO_SSH_PRIVATE_KEY" > "$ssh_home/.ssh/id_ed25519"
|
||||
printf '%s\n' "$NEURO_SSH_KNOWN_HOSTS" > "$ssh_home/.ssh/known_hosts"
|
||||
chmod 600 "$ssh_home/.ssh/id_ed25519" "$ssh_home/.ssh/known_hosts"
|
||||
cat > "$ssh_home/.ssh/config" <<EOF
|
||||
Host neuro
|
||||
HostName 95.31.254.84
|
||||
User root
|
||||
Port 34457
|
||||
IdentityFile $ssh_home/.ssh/id_ed25519
|
||||
IdentitiesOnly yes
|
||||
StrictHostKeyChecking yes
|
||||
UserKnownHostsFile $ssh_home/.ssh/known_hosts
|
||||
EOF
|
||||
chmod 600 "$ssh_home/.ssh/config"
|
||||
export HOME="$ssh_home"
|
||||
export NIX_SSHOPTS="-o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$HOME/.ssh/known_hosts -o IdentitiesOnly=yes -i $HOME/.ssh/id_ed25519"
|
||||
ssh -o BatchMode=yes -o ConnectTimeout=10 \
|
||||
-o StrictHostKeyChecking=yes \
|
||||
|
||||
@@ -318,6 +318,7 @@ case "$label" in
|
||||
usermod --append --groups nixbld "nixbld\\\$nixbld_user"
|
||||
done
|
||||
/tmp/nix-$GCR_NIX_VERSION-\\\$nix_arch/install --no-daemon
|
||||
ln -sf /root/.nix-profile/bin/nix /usr/local/bin/nix
|
||||
rm -rf /tmp/nix*
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user