Curl 不接受 -X 参数
Curl won't accept -X parameter
运行 这个 curl 命令:
curl -u user:pass -X POST -H "Content-Type: application/json" https://localhost:7990/rest/api/1.0/projects/fw/repos
失败:
bash: -X: command not found
$ curl: no URL specified!
这个命令以前有效,所以我不知道哪里出了问题。
您的用户名或密码中似乎有特殊字符。尝试在凭据周围使用单引号,如下所示:
curl -u 'user:pass' -X POST -H "Content-Type: applicat.....
运行 这个 curl 命令:
curl -u user:pass -X POST -H "Content-Type: application/json" https://localhost:7990/rest/api/1.0/projects/fw/repos
失败:
bash: -X: command not found
$ curl: no URL specified!
这个命令以前有效,所以我不知道哪里出了问题。
您的用户名或密码中似乎有特殊字符。尝试在凭据周围使用单引号,如下所示:
curl -u 'user:pass' -X POST -H "Content-Type: applicat.....