繁体   English   中英

在对JIRA进行身份验证时出现curl错误

[英]Error in curl when authenticating into JIRA

curl  -H "Content-Type: application/json; charset=UTF-8" -d '{"username":"admin","password":"admin"}' http://localhost:2990/jira/rest/auth/1/session

我在DOS中使用了上面的查询,我总是得到以下错误:

{“errorMessages”:[“意外字符('''(代码39)):预期有效值(数字,字符串,数组,对象,'真'','假'或'空')\\ n在[来源: org.apache.catalina.connector.CoyoteInputStream@1fd9611; line:1,column:2]“]}

我尝试了许多排列和组合..仍然没有工作..

它是一个windows的东西,试着替换' with "" with """

curl  -H "Content-Type: application/json; charset=UTF-8" -d "{"""username""":"""admin""","""password""":"""admin"""}" ...

在OSX上为我工作。 39是单引号char,但我不知道它来自哪里。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM