使用 APICTL 从 Wso2 APIM 导出 API 时出错

问题描述 投票:0回答:1

我正在尝试使用 apictl 从 wso2 apim 导出 api,在导出 api 时,它会在日志中打印错误

PS C:\WINDOWS\system32> apictl login dev -u admin -p admin --insecure
Warning: Using --password in CLI is not secure. Use --password-stdin
Logged into APIM in dev environment
WARNING: credentials are stored as a plain text in C:\Users\youssef.gamal\.wso2apictl.local\keys.json
PS C:\WINDOWS\system32> apictl export api --name GenericCso --version 1.0.0 --environment dev --verbose
Executed ImportExportCLI (apictl) on Wed, 03 Jul 2024 19:49:01 EET
[INFO]: Insecure: false
[INFO]: api called
[INFO]: connecting to https://localhost:9943/oauth2/token
[INFO]: ExportAPI: URL: https://localhost:9943/publisher/apis/api/am/publisher/v3/apis/export?name=GenericCso&version=1.0.0&providerName=&preserveStatus=true&format=YAML
[INFO]: ResponseStatus: 200
[INFO]: Extracting C:\Users\YOUSSE~1.GAM\AppData\Local\Temp\apim644902823\GenericCso_1.0.0.zip to C:\Users\YOUSSE~1.GAM\AppData\Local\Temp\apim198201050
apictl: Error creating the final zip archive Reason: Stat : The system cannot find the path specified.
Exit status 1
PS C:\WINDOWS\system32> apictl get envs
NAME                API MANAGER ENDPOINT     REGISTRATION ENDPOINT   TOKEN ENDPOINT                        PUBLISHER ENDPOINT                      DEVPORTAL ENDPOINT   ADMIN ENDPOINT      MI MANAGEMENT ENDPOINT
dev                 https://localhost:9943                           https://localhost:9943/oauth2/token   https://localhost:9943/publisher/apis                            
PS C:\WINDOWS\system32>

我已经尝试过使用 chat-gpt 等人工智能解决方案,但对我不起作用

wso2 wso2-api-manager
1个回答
0
投票

这可能是与环境设置有关的问题。可以添加如下环境吗?

apictl add env dev --apim https://localhost:9943 -k

在添加此内容之前,您必须删除名为 dev 的现有环境。

apictl remove env dev
© www.soinside.com 2019 - 2024. All rights reserved.