diff --git a/docs/user_docs/guides/package-management/4-how-to/9-kpm_oci.md b/docs/user_docs/guides/package-management/4-how-to/9-kpm_oci.md index d115b45d..5f8eb483 100644 --- a/docs/user_docs/guides/package-management/4-how-to/9-kpm_oci.md +++ b/docs/user_docs/guides/package-management/4-how-to/9-kpm_oci.md @@ -8,7 +8,24 @@ KCL package management tool uses `ghcr.io` to save KCL packages by default. Default registry - [https://github.com/orgs/kcl-lang/packages](https://github.com/orgs/kcl-lang/packages) -You can adjust the registry and repository name of the OCI registry in the configuration file. The configuration file of the KCL package management tool is located at `$KCL_PKG_PATH/.kpm/config/kpm.json`, if the environment variable `KCL_PKG_PATH` is not set, it is saved by default in `$HOME/.kcl/kpm/.kpm/config/kpm.json`. +You can adjust the registry and repository name of the OCI registry by the follow methods. + +### By environment variable + +You can adjust the configuration of OCI Registry by setting the three environment variables `KPM_REG`, `KPM_REGO`, and `OCI_REG_PLAIN_HTTP`. + +```shell +# set default registry +export KPM_REG="ghcr.io" +# set default repository +export KPM_REPO="kcl-lang" +# set support for 'http' +export OCI_REG_PLAIN_HTTP=off +``` + +### By configuration file + +The configuration file of the KCL package management tool is located at `$KCL_PKG_PATH/.kpm/config/kpm.json`, if the environment variable `KCL_PKG_PATH` is not set, it is saved by default in `$HOME/.kcl/kpm/.kpm/config/kpm.json`. The default content of the configuration file is as follows: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/9-kpm_oci.md similarity index 87% rename from i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md rename to i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/9-kpm_oci.md index ae62c6cd..6dd295cb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/user_docs/guides/package-management/4-how-to/9-kpm_oci.md @@ -8,7 +8,24 @@ KCL 包管理工具默认使用 ghcr.io 保存 KCL 包。 默认 registry - [https://github.com/orgs/kcl-lang/packages](https://github.com/orgs/kcl-lang/packages) -可以在配置文件中调整 Registry 的地址和仓库名。KCL 包管理工具的配置文件位于 `$KCL_PKG_PATH/.kpm/config/kpm.json`, 如果没有设置环境变量 `KCL_PKG_PATH` 的值,则默认保存在 `$HOME/.kcl/kpm/.kpm/config/kpm.json`。 +你可以通过以下方法调整 OCI Registry 的地址和仓库名称。 + +### 通过环境变量 + +你可以通过设置三个环境变量 KPM_REG、KPM_REGO 和 OCI_REG_PLAIN_HTTP 来调整配置。 + +```shell +# 设置默认仓库地址 +export KPM_REG="ghcr.io" +# 设置默认仓库 +export KPM_REPO="kcl-lang" +# 设置支持 'http' +export OCI_REG_PLAIN_HTTP=off +``` + +### 通过配置文件 + +KCL 包管理工具的配置文件位于 `$KCL_PKG_PATH/.kpm/config/kpm.json`,如果环境变量 `KCL_PKG_PATH` 没有设置,它默认保存在 `$HOME/.kcl/kpm/.kpm/config/kpm.json`。 配置文件的默认内容如下: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md similarity index 87% rename from i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md rename to i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md index ae62c6cd..6dd295cb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md @@ -8,7 +8,24 @@ KCL 包管理工具默认使用 ghcr.io 保存 KCL 包。 默认 registry - [https://github.com/orgs/kcl-lang/packages](https://github.com/orgs/kcl-lang/packages) -可以在配置文件中调整 Registry 的地址和仓库名。KCL 包管理工具的配置文件位于 `$KCL_PKG_PATH/.kpm/config/kpm.json`, 如果没有设置环境变量 `KCL_PKG_PATH` 的值,则默认保存在 `$HOME/.kcl/kpm/.kpm/config/kpm.json`。 +你可以通过以下方法调整 OCI Registry 的地址和仓库名称。 + +### 通过环境变量 + +你可以通过设置三个环境变量 KPM_REG、KPM_REGO 和 OCI_REG_PLAIN_HTTP 来调整配置。 + +```shell +# 设置默认仓库地址 +export KPM_REG="ghcr.io" +# 设置默认仓库 +export KPM_REPO="kcl-lang" +# 设置支持 'http' +export OCI_REG_PLAIN_HTTP=off +``` + +### 通过配置文件 + +KCL 包管理工具的配置文件位于 `$KCL_PKG_PATH/.kpm/config/kpm.json`,如果环境变量 `KCL_PKG_PATH` 没有设置,它默认保存在 `$HOME/.kcl/kpm/.kpm/config/kpm.json`。 配置文件的默认内容如下: diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md similarity index 87% rename from i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md rename to i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md index ae62c6cd..6dd295cb 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-oci_reg_supports.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md @@ -8,7 +8,24 @@ KCL 包管理工具默认使用 ghcr.io 保存 KCL 包。 默认 registry - [https://github.com/orgs/kcl-lang/packages](https://github.com/orgs/kcl-lang/packages) -可以在配置文件中调整 Registry 的地址和仓库名。KCL 包管理工具的配置文件位于 `$KCL_PKG_PATH/.kpm/config/kpm.json`, 如果没有设置环境变量 `KCL_PKG_PATH` 的值,则默认保存在 `$HOME/.kcl/kpm/.kpm/config/kpm.json`。 +你可以通过以下方法调整 OCI Registry 的地址和仓库名称。 + +### 通过环境变量 + +你可以通过设置三个环境变量 KPM_REG、KPM_REGO 和 OCI_REG_PLAIN_HTTP 来调整配置。 + +```shell +# 设置默认仓库地址 +export KPM_REG="ghcr.io" +# 设置默认仓库 +export KPM_REPO="kcl-lang" +# 设置支持 'http' +export OCI_REG_PLAIN_HTTP=off +``` + +### 通过配置文件 + +KCL 包管理工具的配置文件位于 `$KCL_PKG_PATH/.kpm/config/kpm.json`,如果环境变量 `KCL_PKG_PATH` 没有设置,它默认保存在 `$HOME/.kcl/kpm/.kpm/config/kpm.json`。 配置文件的默认内容如下: diff --git a/versioned_docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md b/versioned_docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md index d115b45d..5f8eb483 100644 --- a/versioned_docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md +++ b/versioned_docs/version-0.7.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md @@ -8,7 +8,24 @@ KCL package management tool uses `ghcr.io` to save KCL packages by default. Default registry - [https://github.com/orgs/kcl-lang/packages](https://github.com/orgs/kcl-lang/packages) -You can adjust the registry and repository name of the OCI registry in the configuration file. The configuration file of the KCL package management tool is located at `$KCL_PKG_PATH/.kpm/config/kpm.json`, if the environment variable `KCL_PKG_PATH` is not set, it is saved by default in `$HOME/.kcl/kpm/.kpm/config/kpm.json`. +You can adjust the registry and repository name of the OCI registry by the follow methods. + +### By environment variable + +You can adjust the configuration of OCI Registry by setting the three environment variables `KPM_REG`, `KPM_REGO`, and `OCI_REG_PLAIN_HTTP`. + +```shell +# set default registry +export KPM_REG="ghcr.io" +# set default repository +export KPM_REPO="kcl-lang" +# set support for 'http' +export OCI_REG_PLAIN_HTTP=off +``` + +### By configuration file + +The configuration file of the KCL package management tool is located at `$KCL_PKG_PATH/.kpm/config/kpm.json`, if the environment variable `KCL_PKG_PATH` is not set, it is saved by default in `$HOME/.kcl/kpm/.kpm/config/kpm.json`. The default content of the configuration file is as follows: diff --git a/versioned_docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md b/versioned_docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md index d115b45d..583fe28b 100644 --- a/versioned_docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md +++ b/versioned_docs/version-0.8.0/user_docs/guides/package-management/4-how-to/9-kpm_oci.md @@ -8,7 +8,24 @@ KCL package management tool uses `ghcr.io` to save KCL packages by default. Default registry - [https://github.com/orgs/kcl-lang/packages](https://github.com/orgs/kcl-lang/packages) -You can adjust the registry and repository name of the OCI registry in the configuration file. The configuration file of the KCL package management tool is located at `$KCL_PKG_PATH/.kpm/config/kpm.json`, if the environment variable `KCL_PKG_PATH` is not set, it is saved by default in `$HOME/.kcl/kpm/.kpm/config/kpm.json`. +You can adjust the registry and repository name of the OCI registry by the follow methods. + +### By environment variable + +You can adjust the configuration of OCI Registry by setting the three environment variables `KPM_REG`, `KPM_REGO`, and `OCI_REG_PLAIN_HTTP`. + +```shell +# set the kpm default registry +export KPM_REG="ghcr.io" +# set the kpm default repository +export KPM_REPO="kcl-lang" +# set the kpm support for 'http' +export OCI_REG_PLAIN_HTTP=off +``` + +### By configuration file + +The configuration file of the KCL package management tool is located at `$KCL_PKG_PATH/.kpm/config/kpm.json`, if the environment variable `KCL_PKG_PATH` is not set, it is saved by default in `$HOME/.kcl/kpm/.kpm/config/kpm.json`. The default content of the configuration file is as follows: