Domestic Site Download Address | GitHub Download Address (for international sites) | SHA256 Checksum |
6ee8cae7ea86547d7a5acf57f8d919210f076a785c482aafa90f7099ef61d65a | ||
6ac7d595fdcc2e1c8ccaf7b5b227fb3a472cfbde76f95856cd9e95249eff75a5 | ||
87796d1b67b3c7e890762a3bf2cec1338699a8cba6da88d1616a44e323c58925 | ||
8fe85a00260cd2ba920d6b50e62e38079d16eb3553c404191afd09a5e6587d9b | ||
5890c250f1c9a22829d7916d7ba29b1c232722fcb20bb51128ae30f8c2c6c478 | ||
0651ec2678cf6f58d80c35656ca60447d9180d09b2c343827506a6a741fa9554 | ||
b367d11f8068ef699a0932b36237028058f278d7f249494d646dc443d1bec2a3 | ||
7efebfe68836a090c26b0afdf319bdf5c04c834461867b4013806a911404ffad |
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-darwin-amd64
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-darwin-arm64
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-386
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-amd64
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-arm
wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-arm64
coscli-windows.exe
to coscli.exe
.win+r
to open the Run
program.cmd
and press Enter
to open the command line window.coscli --version
in the command line window. If the following information is printed out, the installation is successful:Windows
system, the method of using COSCLI in different command line clients may vary slightly. If entering coscli [command]
does not work properly with COSCLI, please try the format ./coscli [command]
.coscli version v1.0.2
mv coscli-mac coscli
chmod 755 coscli
./coscli --version
in the command line, and if the following information is printed out, the installation is successful:coscli version v1.0.2
Unable to open "coscli" because the developer cannot be verified
appears, you can go to Settings > Security and Privacy > General
and select Still want to open coscli
, afterwards COSCLI can be used normally.mv coscli-linux coscli
chmod 755 coscli
./coscli --version
in the command line window. If the following information is printed out, the installation is successful:coscli version v1.0.2
Enter
to skip../coscli config init
to create a configuration file at ~/.cos.yaml
. You can complete the setup interactively through the command line. Later, you can also use ./coscli config init
to interactively generate a configuration file in another location for COSCLI. You can use ./coscli config show
to view the location and configuration parameters of the file.Configuration Item | Description |
Secret ID | Key ID, it is recommended to use a sub-account key and follow the principle of least privilege to reduce risks. Information on obtaining a sub-account key can be found in Sub-account Access Key Management. |
Secret Key | Key, it is recommended to use a sub-account key and follow the principle of least privilege to reduce risks. Information on obtaining a sub-account key can be found in Sub-account Access Key Management. |
Session Token | Temporary key token, needs to be configured when using a temporary key; otherwise you can skip by pressing Enter . For more information on temporary keys, see Accessing COS Using a Temporary Key. |
Mode | Set the identity mode, supporting enumerated values SecretKey and CvmRole . It can be null, with the default null value being SecretKey , indicating the use of a key request COS. When Mode is CvmRole , it means using Managing Instances Roles to request COS. |
Cvm Role Name | |
protocol | Network transfer protocol, which is HTTPS by default. If you want to change it to HTTP, directly modify it in the configuration file. |
APPID | APPID is the account you receive after successfully applying for a Tencent Cloud account, automatically assigned by the system, and can be obtained from Account Information. A bucket's full name is composed of two elements: Bucket Name and APPID , formatted as <BucketName-APPID> , for details please refer to Bucket Naming Conventions. |
Bucket Name | Bucket name, together with APPID, constitutes the bucket's full name, formatted as <BucketName-APPID> , for details please refer to Bucket Naming Conventions. |
Bucket Endpoint | Domain name of the region where the bucket is located, default domain format is cos.<region>.myqcloud.com , where <region> represents the bucket's region, such as ap-guangzhou, ap-beijing, etc. For a list of supported regions by COS, see Regions and Access Endpoints.If the bucket has global acceleration enabled, you can configure a global acceleration domain name. For example, the global acceleration domain name is set to cos.accelerate.myqcloud.com ; the internal network global acceleration domain name is set to cos-internal.accelerate.tencentcos.cn . |
Bucket Alias | Bucket alias, once configured, you can use BucketAlias to replace BucketName-APPID , reducing the command length required for input. If this option is not configured, the value of BucketAlias is the same as BucketName-APPID . |
OFS Bucket | Metadata acceleration bucket tag, used to identify whether the bucket has the metadata acceleration feature enabled. |
Auto Switch Host | Set whether to disable automatic switch of a backup domain. Optional values are true and false, which can be null. If the value is not set or set to false, the backup domain switch will be executed; If the value is set to true, the backup domain switch will not be executed. |
./coscli config add
command to add bucket configurations. If you need to modify the configuration file or learn more about operations related to the configuration file, refer to the config command or use the ./coscli config --help
command for quick access to related instructions../coscli --help
../coscli config init
command, you can also manually write the COSCLI configuration file. The format of the COSCLI configuration file is in yaml
format, with an example configuration as follows:cos:base:secretid: XXXXXXXXXXXXXXXsecretkey: XXXXXXXXXXXXXXXXXsessiontoken: ""protocol: httpsbuckets:- name: examplebucket1-1250000000alias: bucket1region: ap-shanghaiendpoint: cos.ap-shanghai.myqcloud.comofs: false- name: examplebucket2-1250000000alias: bucket2region: ap-guangzhouendpoint: cos.ap-guangzhou.myqcloud.comofs: false- name: examplebucket3-1250000000alias: bucket3region: ap-chengduendpoint: cos.ap-chengdu.myqcloud.comofs: false
Was this page helpful?