tiup mirror init
コマンドtiup mirror init
空のミラーを初期化するために使用されます。初期化されたミラーには、コンポーネントやコンポーネントの所有者は含まれません。このコマンドは、初期化されたミラーに対して以下のファイルのみを生成します。
+ <mirror-dir> # Mirror's root directory
|-- root.json # Mirror's root certificate
|-- 1.index.json # Component/user index
|-- snapshot.json # Mirror's latest snapshot
|-- timestamp.json # Mirror's latest timestamp
|--+ keys # Mirror's private key (can be moved to other locations)
|-- {hash1..hashN}-root.json # Private key of the root certificate
|-- {hash}-index.json # Private key of the indexes
|-- {hash}-snapshot.json # Private key of the snapshots
|-- {hash}-timestamp.json # Private key of the timestamps
上記ファイルの具体的な使用方法や内容の形式については、 TiUPミラーリファレンスガイドを参照してください。
構文
tiup mirror init <path> [flags]
<path>
、 TiUPがミラーファイルを生成して保存するローカルディレクトリを指定するために使用されます。ローカルディレクトリは相対パスで指定できます。指定されたディレクトリが既に存在する場合は、空である必要があります。存在しない場合は、 TiUP が自動的に作成します。
オプション
-k, --key-dir
- TiUPが秘密鍵ファイルを生成するディレクトリを指定します。指定されたディレクトリが存在しない場合は、 TiUPが自動的に作成します。
- データ型:
STRING
- コマンドでこのオプションを指定しない場合、 TiUP はデフォルトで
{path}/keys
に秘密鍵ファイルを生成します。
出力
- コマンドが正常に実行された場合、出力はありません。
- 指定された
<path>
空でない場合、 TiUP はエラーError: the target path '%s' is not an empty directory
報告します。 - 指定された
<path>
ディレクトリでない場合、 TiUP はエラーError: fdopendir: not a directory
報告します。