Override SSSD KnownHostsCommand in CI SSH config
- Add SSH config to bypass sss_ssh_knownhosts command - Set StrictHostKeyChecking no for gitea.kindred.internal - Use local known_hosts file instead of SSSD lookup
This commit is contained in:
@@ -28,12 +28,19 @@ jobs:
|
||||
fi
|
||||
node --version
|
||||
|
||||
- name: Setup SSH known hosts
|
||||
- name: Setup SSH for Gitea
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -H gitea.kindred.internal >> ~/.ssh/known_hosts 2>/dev/null
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
# Override SSSD KnownHostsCommand that interferes with SSH
|
||||
cat >> ~/.ssh/config << 'EOF'
|
||||
Host gitea.kindred.internal
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile ~/.ssh/known_hosts
|
||||
EOF
|
||||
chmod 600 ~/.ssh/config
|
||||
|
||||
- name: Checkout repository
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
@@ -36,12 +36,19 @@ jobs:
|
||||
fi
|
||||
node --version
|
||||
|
||||
- name: Setup SSH known hosts
|
||||
- name: Setup SSH for Gitea
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
ssh-keyscan -H gitea.kindred.internal >> ~/.ssh/known_hosts 2>/dev/null
|
||||
chmod 600 ~/.ssh/known_hosts
|
||||
# Override SSSD KnownHostsCommand that interferes with SSH
|
||||
cat >> ~/.ssh/config << 'EOF'
|
||||
Host gitea.kindred.internal
|
||||
StrictHostKeyChecking no
|
||||
UserKnownHostsFile ~/.ssh/known_hosts
|
||||
EOF
|
||||
chmod 600 ~/.ssh/config
|
||||
|
||||
- name: Checkout repository
|
||||
uses: https://code.forgejo.org/actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user