# 访问 Swift 接口
$ swift -A http://admin:7480/auth/1.0 -U rgwuser:swift -K 'ja3mxJTGD7tvFsK1tVL8qScWPp2Wn657Jo4h4vLv' list
输出如下:
[zzq@localhost ~]$ swift -A http://admin:7480/auth/1.0 -U rgwuser:swift -K 'ja3mxJTGD7tvFsK1tVL8qScWPp2Wn657Jo4h4vLv' list
my-first-s3-bucket
[zzq@localhost ~]$
[zzq@localhost ~]$ swift -A http://admin:7480/auth/1.0 -U rgwuser:swift -K '' list
Auth version 1.0 requires ST_AUTH, ST_USER, and ST_KEY environment variables
to be set or overridden with -A, -U, or -K.
Auth version 2.0 requires OS_AUTH_URL, OS_USERNAME, OS_PASSWORD, and
OS_TENANT_NAME OS_TENANT_ID to be set or overridden with --os-auth-url,
--os-username, --os-password, --os-tenant-name or os-tenant-id. Note:
adding "-V 2" is necessary for this.