kynmh69 / go-ja-holidays

日本の祝日を返却するAPIを提供します。
Apache License 2.0
0 stars 0 forks source link

fix image push #15

Closed kynmh69 closed 7 months ago

kynmh69 commented 7 months ago

バグの説明

以下のエラーでイメージのプッシュができない。

Run echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST}
Generating ephemeral keys...
Retrieving signed certificate...
Error: signing [ghcr.io/kynmh69/go-ja-holidays-updater:main@sha256:d5d3d11b1d78f668b45347f72a4bd76389e25219e18d6bc7291dd6a9a6d09235]: getting signer: getting key from Fulcio: getting CTFE public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
remote status:{
    "mirror": "https://tuf-repo-cdn.sigstore.dev",
    "metadata": {
        "root.json": {
            "version": 9,
            "len": 6766,
            "expiration": "12 Sep 24 06:53 UTC",
            "error": ""
        },
        "snapshot.json": {
            "version": 1[32](https://github.com/kynmh69/go-ja-holidays/actions/runs/8352296581/job/22862161758#step:8:33),
            "len": 2302,
            "expiration": "09 Apr 24 16:16 UTC",
            "error": ""
        },
        "targets.json": {
            "version": 9,
            "len": 5478,
            "expiration": "12 Sep 24 06:13 UTC",
            "error": ""
        },
        "timestamp.json": {
            "version": 169,
            "len": 723,
            "expiration": "26 Mar 24 16:16 UTC",
            "error": ""
        }
    }
}
main.go:74: error during command execution: signing [ghcr.io/kynmh69/go-ja-holidays-updater:main@sha256:d5d3d11b1d78f668b45[34](https://github.com/kynmh69/go-ja-holidays/actions/runs/8352296581/job/22862161758#step:8:35)7f72a4bd76389e25219e18d6bc7291dd6a9a6d092[35](https://github.com/kynmh69/go-ja-holidays/actions/runs/8352296581/job/22862161758#step:8:36)]: getting signer: getting key from Fulcio: getting CTFE public keys: updating local metadata and targets: error updating to TUF remote mirror: invalid key
remote status:{
    "mirror": "https://tuf-repo-cdn.sigstore.dev/",
    "metadata": {
        "root.json": {
            "version": 9,
            "len": 6766,
            "expiration": "12 Sep 24 06:53 UTC",
            "error": ""
        },
        "snapshot.json": {
            "version": 132,
            "len": 2302,
            "expiration": "09 Apr 24 16:16 UTC",
            "error": ""
        },
        "targets.json": {
            "version": 9,
            "len": 5[47](https://github.com/kynmh69/go-ja-holidays/actions/runs/8352296581/job/22862161758#step:8:48)8,
            "expiration": "12 Sep 24 06:13 UTC",
            "error": ""
        },
        "timestamp.json": {
            "version": 169,
            "len": 723,
            "expiration": "26 Mar 24 16:16 UTC",
            "error": ""
        }
    }
}
Error: Process completed with exit code 123.

再現手順 この挙動を再現する手順:

  1. ブランチにプッシュする

期待される挙動 イメージがプッシュされること

スクリーンショット

image

追加のコンテキスト

この辺が参考になりそう

kynmh69 commented 7 months ago
Run echo "${TAGS}" | xargs -I {} cosign sign --yes --force {}@${DIGEST}
Error: unknown flag: --force
main.go:74: error during command execution: unknown flag: --force
Error: Process completed with exit code 123.

forceはだめだった。

GuacOn commented 7 months ago

I came across this while troubleshooting the same issue, and resolved it by bumping cosign from v3.1.1 to v3.3.0

uses: sigstore/cosign-installer@v3.3.0
        with:
          cosign-release: 'v2.2.2'