根据Portainer CE和Portainer Agent的版本,可以通过以下接口获取请求参数X-Registry-Auth:

  1. 首先,需要使用 /api/endpoints/{endpoint}/docker/info 接口获取Docker信息。

  2. 在返回的响应中,查找 RegistryConfig 字段,该字段包含了与注册表相关的配置信息。

  3. 根据 RegistryConfig 字段中的内容,可以获取到 RegistryURL(注册表URL)和 RegistryAuthentication(注册表身份验证)信息。

  4. 通过将 RegistryAuthentication 进行 Base64 编码,可以得到 X-Registry-Auth 请求参数的值。

请注意,以上步骤仅适用于 Portainer CE 2.9.1 和 Portainer Agent 2.11.0 版本。在其他版本中,具体的接口和参数可能会有所不同。

portainerce 291 和portianer-agent 2110apiendpointsendpointdockerimagescreate的请求参数X-Registry-Auth需要从哪个接口获取?

原文地址: https://www.cveoy.top/t/topic/iqxe 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录