导出 API 时出现以下错误。请提出建议。
G:\WSO2\apimcli>apimcli export-api -n PizzaShackAPI -v 1.0.0 -r admin -e dev -k
apimcli: Error while exporting Reason: Get https://localhost:9443/carbon/admin/login.jsp: Auto redirect is disabled
Exit status 1
G:\WSO2\apimcli>apimcli export-api -n PizzaShackAPI -v 1.0.0 -r admin -e dev
apimcli: Error while exporting Reason: Get https://localhost:9443/api-import-export-2.6.0-v0/export-api?name=PizzaShackAPI&preserveStatus=true&provider=admin&version=1.0.0: x509: certificate signed by unknown authority
Exit status 1
最佳答案
确保您部署的 api-import-export war 版本与您在添加环境命令 [1] 中配置的版本相同。
apimcli add-env -n production \
--registration https://localhost:9443/client-registration/v0.14/register \
--apim https://localhost:9443 \
--token https://localhost:8243/token \
--import-export https://localhost:9443/api-import-export-2.6.0-v10 \
--admin https://localhost:9443/api/am/admin/v0.14 \
--api_list https://localhost:9443/api/am/publisher/v0.14/apis \
--app_list https://localhost:9443/api/am/store/v0.14/applications
在上面的例子中,它是 api-import-export-2.6.0-v10
。
关于wso2 - 导出 WSO2 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57721363/