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:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
@@ -7,12 +7,17 @@ jobs:
|
|||||||
probe:
|
probe:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Decode and hash
|
- name: Decode and inspect
|
||||||
env:
|
env:
|
||||||
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
run: |
|
run: |
|
||||||
echo "$SSH_KEY" | base64 -d > /tmp/k
|
echo "$SSH_KEY" | base64 -d > /tmp/k
|
||||||
echo "key lines: $(wc -l < /tmp/k)"
|
|
||||||
echo "key bytes: $(wc -c < /tmp/k)"
|
echo "key bytes: $(wc -c < /tmp/k)"
|
||||||
echo "sha256(b64): $(echo "$SSH_KEY" | tr -d '\n' | sha256sum | cut -d' ' -f1)"
|
echo "first line: $(head -1 /tmp/k)"
|
||||||
ssh-keygen -y -f /tmp/k >/dev/null 2>&1 && echo "KEYGEN_OK" || echo "KEYGEN_FAIL"
|
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