当我调用脚本:
powershell tosca_execution_client。ps1 -toscaServerUrl % [DEX_URL] projectname % [DEX_Project]事件[TestEvents] clientId % [DEX_Client_ID] clientSecret % (DEX_Client_Secret)
我得到错误消息:
2023-07-18 13:09:34 + 2[正]开始ToscaExecutionClient……
2023-07-18 13:09:34 + 2[正]参数“eventsConfigFilePath”定义。使用配置文件。
获取内容:Der Pfad“C: \…”萤石不gefunden了,da er不vorhanden。
在C: \…\ tosca_execution_client。ps1:581 Zeichen: 22
+ $脚本:事件=获取内容路径美元eventsConfigFilePath生
+ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~
+ CategoryInfo: ObjectNotFound: (C: \…:字符串)获取内容,ItemNotFoundException
+ FullyQualifiedErrorId: PathNotFound Microsoft.PowerShell.Commands.GetContentCommand
2023-07-18 13:09:34 + 2[正]ClientId和clientSecret被提供。身份验证将启用。获取访问令牌与提供凭证…
2023-07-18 13:09:34 + 2[正]获取访问令牌与提供凭证…
2023-07-18 13:09:34 + 2 (ERR) ToscaExecutionClient未能获取访问令牌。
2023-07-18 13:09:34 + 2 (ERR){“错误”:“invalid_client”}
2023-07-18 13:09:34 + 2[正]排队执行提供参数…
2023-07-18 13:09:34 + 2[正]获取访问令牌与提供凭证…
2023-07-18 13:09:34 + 2 (ERR) ToscaExecutionClient未能获取访问令牌。
2023-07-18 13:09:34 + 2 (ERR){“错误”:“invalid_client”}
2023-07-18 13:09:34 + 2 (ERR) ToscaExecutionClient未能排队执行。
2023-07-18 13:09:34 + 2 (ERR) Der Remoteserver帽子杯Fehler zuruckgegeben:(401)不autorisiert。
但是我没有指定一个eventsConfigFilePath
。什么是怎么回事?
(最初要求和解决支持中心)
最佳答案凯特
The\u00a0-events<\/strong>\u00a0option doesn't work as documented. At least not in the version I was using. Use\u00a0-eventsConfigFilePath<\/strong>\u00a0and a JSON file instead. It's cleaner and scales better anyway.<\/p> The correct syntax is using a single dash and space(es) between parameter name and parameter value.<\/p>powershell ToscaExecutionClient\\tosca_execution_client.ps1\t^
-toscaServerUrl\t\t\t%DEX_URL%\t\t\t\t\t\t^
-projectName\t\t\t%DEX_Project%\t\t\t\t\t^
-eventsConfigFilePath\t%~dp0\\%DEX_Job%.json\t\t\t^
-clientId\t\t\t\t%DEX_Client_ID%\t\t\t\t\t^
-clientSecret\t\t\t%DEX_Client_Secret%\t\t\t\t^
-creator\t\t\t\t%USERNAME%:%DEX_Job%\t\t\t^
-importResults\t\t\ttrue
<\/code><\/pre>","className":"post__content__best_answer"}">