使用此guide,我一直在尝试访问IBM Object Storage中的容器,我已经安装了python-swiftclient库并运行此命令(AUTH_URL,USERNAME,KEY来自IBM Bluemix Object Storage Credentials Section ):
swift -A <AUTH_URL> -U <USERNAME> -K <KEY> stat -v
我收到以下错误:
Auth GET failed: https://identity.open.softlayer.com/ 300 Multiple Choices [first 60 chars of response] {"versions": {"values": [{"status": "stable", "updated": "20
我也尝试过其他凭据,看上网,到目前为止没有运气。这有什么问题?
答案 0 :(得分:1)
如果您指的是云对象存储(S3兼容版本),请查看https://ibm-public-cos.github.io/crs-docs/crs-python.html。 KnowledgeLayer中的示例适用于基于SWIFT的选项。新的Cloud Object Storage使用S3 API样式命令。
答案 1 :(得分:0)
使用以下内容:
swift \
--os-auth-url=https://identity.open.softlayer.com/v3 \
--auth-version=3 \
--os-project-id=<projectId> \
--os-region-name=<region> \
--os-username=<username> \
--os-password=<password> \
--os-user-domain-id=<domainId> \
stat -v
您可以在Bluemix仪表板的Object Storage服务的凭证部分找到projectId,region,username,password,domainId的值。
另一种选择是设置环境变量OS_AUTH_URL
,OS_AUTH_VERSION
,OS_PROJECT_ID
,OS_REGION_NAME
,OS_USERNAME
(或OS_USER_ID
),{ {1}}和OS_PASSWORD
。