Techioz Blog

Chef Supermarket へのクックブックのアップロードが認証エラーで失敗する

概要

クックブックを Chef Supermarket にアップロードしようとしていますが、以下のエラーが発生して失敗します。

# knife supermarket share starter -VV
INFO: Using configuration from /root/chef-repo/.chef/config.rb
INFO: Validating ruby files
INFO: Validating templates
INFO: Syntax OK
Generating metadata for starter from /tmp/chef-starter-build20231025-11775-6q4gys/starter/metadata.rb
Making tarball starter.tgz
DEBUG: Signing: method: post, url: https://supermarket.chef.io/api/v1/cookbooks, file: #<File:0x0000000002fa4b58>, User-id: vinothini02, Timestamp: 2023-10-25T13:13:39Z
ERROR: Authentication failed due to an invalid public/private key pair. If you have changed your keys recently try logging out and logging back in to Supermarket.

誰かこれについて手伝ってくれませんか?

解決策

Chef インフラ (https://api.chef.io/) でアカウントを作成する必要があります。 クライアント pem をダウンロードして、マイ アカウント (https://id.chef.io/id/profile) に移動します。この pem を .chef ディレクトリの下で使用します。