解决了

ClientId或clientSecret不提供。没有认证

  • 2023年7月20
  • 1回复
  • 5视图

Userlevel 5
徽章 + 2
  • 社区经理
  • 72回复

我得到以下错误消息:

2023-07-18 11:18:01 + 2[正]开始ToscaExecutionClient……

2023-07-18 11:18:01 + 2[正]参数“eventsConfigFilePath”定义。使用配置文件。

获取内容:Der Pfad ....“萤石不gefunden

了,da er不vorhanden。

在…\ tosca_execution_client。ps1:581 Zeichen: 22

+ $脚本:事件=获取内容路径美元eventsConfigFilePath生

+ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

+ CategoryInfo: ObjectNotFound: (C: \ ....)获取内容,ItemNotFoundException

+ FullyQualifiedErrorId: PathNotFound Microsoft.PowerShell.Commands.GetContentCommand

2023-07-18 11:18:01 + 2 [WRN] ClientId或clientSecret不提供。没有身份验证……

2023-07-18 11:18:01 + 2[正]排队执行提供参数…

2023-07-18 11:18:01 + 2 (ERR) ToscaExecutionClient未能排队执行。

2023-07-18 11:18:01 + 2 (ERR) Der Remoteserver帽子杯Fehler zuruckgegeben:(401)不autorisiert。

我试着下面的命令行,没有指定一个eventsConfigFilePath和这些工作给不同的错误消息:

powershell tosca_execution_client。ps1 -toscaServerUrl % DEX_URL % projectname % DEX_Project %事件TestEvents -clientId = % Tosca_Client_ID % -clientSecret = % Tosca_Client_Secret %

powershell tosca_execution_client。ps1 -toscaServerUrl % DEX_URL % projectname % DEX_Project %事件TestEvents clientId = % Tosca_Client_ID % clientSecret = % Tosca_Client_Secret %

powershell tosca_execution_client。ps1 -toscaServerUrl % DEX_URL % projectname % DEX_Project %事件TestEvents clientId % Tosca_Client_ID % clientSecret % Tosca_Client_Secret %

你能提供一个完整的工作的例子,所以我可以领略到一个正确的命令行是什么样子?谢谢你!

(最初要求和解决支持中心)

图标

最佳答案凯特2023年7月20日16:25

Answering my own Question:<\/p>

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"}">
查看原始

1回复

Userlevel 5
徽章 + 2

回答我的问题:

事件选择不做记录。至少在我用的版本。使用-eventsConfigFilePath和一个JSON文件。最好的清洁和尺度。

正确的语法是使用一个破折号和空间(es)之间的参数名和参数值。

powershell ToscaExecutionClient \ tosca_execution_client。ps1 ^
-toscaServerUrl % DEX_URL % ^
projectname % DEX_Project % ^
-eventsConfigFilePath % ~ dp0 \ % DEX_Job %。json ^
-clientId % DEX_Client_ID % ^
-clientSecret % DEX_Client_Secret % ^
创造者%用户名%:% DEX_Job % ^
-importResults真实

回复


Learn more about our cookies.<\/a>","cookiepolicy.button":"Accept cookies","cookiepolicy.button.deny":"Deny all","cookiepolicy.link":"Cookie settings","cookiepolicy.modal.title":"Cookie settings","cookiepolicy.modal.content":"We use 3 different kinds of cookies. You can choose which cookies you want to accept. We need basic cookies to make this site work, therefore these are the minimum you can select. Learn more about our cookies.<\/a>","cookiepolicy.modal.level1":"Basic
Functional","cookiepolicy.modal.level2":"Normal
Functional + analytics","cookiepolicy.modal.level3":"Complete
Functional + analytics + social media + embedded videos"}}}">
Baidu