Before using obsutil, you need to configure the OBS endpoint and AK/SK for obsutil to interconnect with OBS. Then, you can use obsutil to operate OBS buckets and objects.
Run the config command (for more information about config, see Updating a Configuration File):
dir
ls -a
or
ls -al
Using a permanent AK/SK pair (you do not need to enter a token, and press Enter to skip it):
obsutil config -interactivePlease input your ak:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your sk:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your endpoint:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your token:Config file url:C:\Users\tools\.obsutilconfigUpdate config file successfully!
Using a temporary AK/SK pair and a security token:
obsutil config -interactivePlease input your ak:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your sk:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your endpoint:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your token:xxxxxxxxxxxxxxxxxxxxxxxxxConfig file url:C:\Users\tools\.obsutilconfigUpdate config file successfully!
Using a permanent AK/SK pair (you do not need to enter a token, and press Enter to skip it):
./obsutil config -interactivePlease input your ak:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your sk:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your endpoint:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your token:Config file url:/root/.obsutilconfigUpdate config file successfully!
Using a temporary AK/SK pair and a security token:
./obsutil config -interactivePlease input your ak:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your sk:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your endpoint:xxxxxxxxxxxxxxxxxxxxxxxxxPlease input your token:xxxxxxxxxxxxxxxxxxxxxxxxxConfig file url:/root/.obsutilconfigUpdate config file successfully!
After the initial configuration is complete, run the following command to check the connectivity:
obsutil ls -s
./obsutil ls -s
Check the command output:
If the command output contains "Http status [403]", you may not have the required permissions for obtaining the bucket list. A further analysis is required to identify the root cause.