fix(release): SIGNING_KEY에 지문이 들어간 경우를 이름 대고 넣는 법을 적는다
pr / ci (pull_request) Successful in 3m42s

signing-check(run 10)로 v1.0.0 서명 실패의 원인을 찾았다. SIGNING_KEY
secret은 40글자 한 줄이었고 BEGIN·END 줄이 없었다. base64로 읽으면 30바이트,
첫 패킷 tag 55(0x37)였다. 16진수 40글자 지문 `92…`를 base64로 읽으면
첫 바이트가 0xF7, 곧 tag 0x37이다. 비밀 키 대신 키 지문이 들어갔다.

- check-signing-key.sh: 값이 16진수 8·16·40글자(키 ID·지문)면 그렇다고
  말한다. 릴리스 키 지문과 같으면 그것도 말한다(공개 정보만 비교한다).
- release.md 1절: SIGNING_KEY에 넣을 것(export 파일 전체, 줄바꿈 그대로),
  넣는 곳, signing-check로 확인하는 법. 3절: 비밀 값을 바꾼 뒤 첫 태그 전에
  signing-check. 5절: 서명 실패 행. 아무것도 게시되지 않았으면 태그를 고친
  커밋으로 옮겨 같은 버전을 쓴다는 규칙(총괄 결정과 같게).

검증: 지문 40글자를 넣은 경우 rc=1과 「key ID or fingerprint (the release
key's fingerprint)」. 앞 커밋의 시험 다섯은 그대로 통과한다.
This commit is contained in:
DongHyeonka
2026-11-08 15:07:06 +09:00
parent 5e0c89dab4
commit 732cb26eb5
2 changed files with 23 additions and 3 deletions
+9 -1
View File
@@ -24,7 +24,7 @@ if [ -z "${SIGNING_KEY:-}" ]; then
fi
[ -n "${SIGNING_PASSWORD:-}" ] || echo "check-signing-key: SIGNING_PASSWORD is empty (only right for a key without a passphrase)"
python3 - <<'PY' || fail=1
EXPECTED_FINGERPRINT=$expected python3 - <<'PY' || fail=1
import base64, os, re, sys
key = os.environ["SIGNING_KEY"]
@@ -39,6 +39,14 @@ print(f"shape: {len(key)} characters, {key.count(chr(10)) + 1} lines,"
f" leading whitespace {'yes' if key[:1].isspace() else 'no'},"
f" trailing whitespace {'yes' if key[-1:].isspace() else 'no'}")
stripped = key.strip()
if re.fullmatch(r"(0x)?[0-9A-Fa-f]{8}|(0x)?[0-9A-Fa-f]{16}|[0-9A-Fa-f]{40}", stripped):
expected = os.environ.get("EXPECTED_FINGERPRINT", "")
same = " (the release key's fingerprint)" if expected and stripped.upper() == expected.upper() else ""
print(f"PROBLEM: SIGNING_KEY holds a {len(stripped)}-hex-digit key ID or fingerprint{same}, not the key."
" Put in the output of `gpg --armor --export-secret-keys <fingerprint>` instead, BEGIN to END lines.")
sys.exit(1)
lines = key.replace("\r\n", "\n").replace("\r", "\n").split("\n")
while lines and lines[-1].strip() == "":
lines.pop()