ci: probe key format deeper
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Probe SSH Key Secret
|
||||
name: Probe SSH Key Secret v2
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
@@ -7,12 +7,17 @@ jobs:
|
||||
probe:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Decode and hash
|
||||
- name: Decode and inspect
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
echo "$SSH_KEY" | base64 -d > /tmp/k
|
||||
echo "key lines: $(wc -l < /tmp/k)"
|
||||
echo "key bytes: $(wc -c < /tmp/k)"
|
||||
echo "sha256(b64): $(echo "$SSH_KEY" | tr -d '\n' | sha256sum | cut -d' ' -f1)"
|
||||
ssh-keygen -y -f /tmp/k >/dev/null 2>&1 && echo "KEYGEN_OK" || echo "KEYGEN_FAIL"
|
||||
echo "first line: $(head -1 /tmp/k)"
|
||||
echo "last line: $(tail -1 /tmp/k)"
|
||||
echo "--- xxd head ---"
|
||||
head -c 60 /tmp/k | xxd | head -3
|
||||
echo "--- ssh-keygen verbose ---"
|
||||
ssh-keygen -y -f /tmp/k; echo "keygen_exit=$?"
|
||||
echo "--- openssl check? ---"
|
||||
base64 --version | head -1
|
||||
Reference in New Issue
Block a user