![](/img/trans.png)
[英]AWS Identity TVM returns Http 401 response with 'client signature doesnt match' error
[英]Openstack authentication always get 401 HTTP response
我最近在openstack上做项目。 我开始 我想通过RESTful API
访问openstack帐户。 我在官方网站上阅读了API指南。 链接位于http://developer.openstack.org/api-guide/quick-start/api-quick-start.html#authenticate 。
我以相同的方式进行身份验证。
这是我的命令:
curl -s -X POST https://url:5000/v2.0/tokens -H "Content-Type: application/json" -d '{"auth": {"tenantName": "MyTenantName", "passwordCredentials": {"username": "'"myAccountNme"'", "password": "mypassword"}}}'
但是,每当我刚收到401 (Unauthorized)
回复时The request you have made requires authentication
。 错误消息在这里。
我的要求出了什么问题? 我的用户名和密码正确,可以使用它从仪表板访问我的帐户。
由于您使用的是https,因此我认为您会收到错误消息,因为您没有指定证书。 使用curl的--cert或--cacert选项。 像这样:
curl --cacert <your_crt_file> -X POST https://url:5000/v2.0/tokens -H "Content-Type: application/json" -d '{"auth": {"tenantName": "MyTenantName", "passwordCredentials": {"username": "'"myAccountNme"'", "password": "mypassword"}}}'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.