{"detail":"未提供身份验证凭据"}

问题描述

我尝试在 centos7 上使用 curl 在 ralph 的 API 中通过 cli 编辑 ralph 中的资产

我的脚本文件

 # Edit Assets #
 ###############
 curl -s -H "Content-Type: application/json" -H "Author.ization: Token 3e8fec13aabca239de1d9f9595c2553d6a8a22de" -X PATCH http://10.4.4.31/api/datacenter-assets/ -d '{"hostname": "'$1'","'$2'"}'

当我输入时: ./ralphmgm2.sh test1 test3

将主机名从 test1 编辑到 test3,我面临这个问题:

./ralphmgm2.sh: line 2: ta-center-assets:http://10.4.4.31/api/data-center-assets/,data-centers:http://10.4.4.31/api/data-centers/,databases:http://10.4.4.31/api/databases/,dc-hosts:http://10.4.4.31/api/dc-h: No such file or directory
{"detail":"Authentication credentials were not provided."}[root@itit_1597_ralp1 ~]#

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)