1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-12-03 13:31:12 +03:00

ci: set file mode early in appveyor_docker.yml

Also:
- replace tab with spaces in generated config file
- formatting

Cherry-picked from #1175
This commit is contained in:
Viktor Szakats
2023-08-18 20:56:50 +00:00
parent a79218d3a0
commit 633db55f50

View File

@@ -52,18 +52,17 @@ jobs:
- name: Setup SSH client configuration - name: Setup SSH client configuration
run: | run: |
cd ~ cd ~
mkdir .ssh mkdir -m 0700 .ssh
chmod 0700 .ssh install -m 0600 /dev/null .ssh/config
echo "ServerAliveInterval 45" > .ssh/config {
echo "Host ${{ github.event.inputs.ssh_host }}" >> .ssh/config echo 'ServerAliveInterval 45'
echo "${{ github.event.inputs.ssh_forward }}" | sed 's/,/\n/g' | sed 's/^/\tRemoteForward /g' >> .ssh/config echo 'Host ${{ github.event.inputs.ssh_host }}'
chmod 0600 .ssh/config echo '${{ github.event.inputs.ssh_forward }}' | sed 's/,/\n/g' | sed 's/^/ RemoteForward /g'
cat .ssh/config } | tee -a .ssh/config
echo "${{ github.event.inputs.ssh_host }} ${{ github.event.inputs.ssh_hostkey }}" | sed 's/,/\n${{ github.event.inputs.ssh_host }} /g' > .ssh/known_hosts install -m 0600 /dev/null .ssh/known_hosts
chmod 0600 .ssh/known_hosts echo '${{ github.event.inputs.ssh_host }} ${{ github.event.inputs.ssh_hostkey }}' | sed 's/,/\n${{ github.event.inputs.ssh_host }} /g' | tee -a .ssh/known_hosts
cat .ssh/known_hosts install -m 0600 /dev/null .ssh/id_rsa
echo "${{ github.event.inputs.ssh_privkey }}" | sed 's/,/\n/g' > .ssh/id_rsa echo '${{ github.event.inputs.ssh_privkey }}' | sed 's/,/\n/g' >> .ssh/id_rsa
chmod 0600 .ssh/id_rsa
# we sleep explicitly to allow the remote system to kill the sleep process # we sleep explicitly to allow the remote system to kill the sleep process
- name: Connect to AppVeyor and sleep - name: Connect to AppVeyor and sleep