alicloud-storage-oss-ossutil by cinience/alicloud-skills
npx skills add https://github.com/cinience/alicloud-skills --skill alicloud-storage-oss-ossutil类别:工具
python skills/storage/oss/alicloud-storage-oss-ossutil/scripts/check_ossutil.py --output output/alicloud-storage-oss-ossutil/validate.txt
通过标准:命令退出码为 0 且生成 output/alicloud-storage-oss-ossutil/validate.txt 文件。
output/alicloud-storage-oss-ossutil/ 目录下。ossutil config 或配置文件)。ossutil ls 列出存储桶,然后使用存储桶区域列出对象。广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
references/install.md。交互式配置:
ossutil config
默认配置文件路径:
~/.ossutilconfigC:\Users\issuser\.ossutilconfig主要配置字段包括:
AccessKey IDAccessKey SecretRegion(例如默认 cn-hangzhou;如果不确定最佳区域,请询问用户)Endpoint(可选;如果省略,则根据区域自动推导)使用具有最小权限的 RAM 用户/角色,并避免在命令行中明文传递 AK。
推荐方法(环境变量):
export ALICLOUD_ACCESS_KEY_ID="<your-ak>"
export ALICLOUD_ACCESS_KEY_SECRET="<your-sk>"
export ALICLOUD_REGION_ID="cn-beijing"
ALICLOUD_REGION_ID 可用作默认区域;如果未设置,则选择最合理的区域,如果不明确请询问用户。
或者使用标准的共享凭据文件:
~/.alibabacloud/credentials
[default]
type = access_key
access_key_id = <your-ak>
access_key_secret = <your-sk>
ossutil configossutil api put-bucket-aclossutil ls
ossutil ls oss://your-bucket -r --short-format --region cn-shanghai -e https://oss-cn-shanghai.aliyuncs.com
ossutil cp ./local.txt oss://your-bucket/path/local.txt
ossutil cp oss://your-bucket/path/remote.txt ./remote.txt
ossutil sync ./local-dir oss://your-bucket/path/ --delete
ossutil ls
从输出中获取目标存储桶区域(例如 oss-cn-shanghai)并将其转换为 --region 格式(cn-shanghai)。
列出对象时,显式设置 --region 和 -e 以避免跨区域签名/终端节点错误。
ossutil ls oss://your-bucket \
-r --short-format \
--region cn-shanghai \
-e https://oss-cn-shanghai.aliyuncs.com
4. 对于非常大的存储桶,首先限制输出大小。
ossutil ls oss://your-bucket --limited-num 100
ossutil ls oss://your-bucket/some-prefix/ -r --short-format --region cn-shanghai -e https://oss-cn-shanghai.aliyuncs.com
Error: region must be set in sign version 4.
region,或传递 --region cn-xxx。The bucket you are attempting to access must be addressed using the specified endpoint
-e https://oss-cn-hongkong.aliyuncs.com。Invalid signing region in Authorization header
--region 和 -e;两者都必须与存储桶区域匹配。OSSUTIL 2.0 概述及安装/配置:
官方来源列表:references/sources.md
ALICLOUD_ACCESS_KEY_ID、ALICLOUD_ACCESS_KEY_SECRET,可选的 ALICLOUD_REGION_ID。每周安装数
157
代码仓库
GitHub 星标数
337
首次出现
12 天前
安全审计
安装于
gemini-cli156
github-copilot156
codex156
amp156
kimi-cli156
cursor156
Category: tool
python skills/storage/oss/alicloud-storage-oss-ossutil/scripts/check_ossutil.py --output output/alicloud-storage-oss-ossutil/validate.txt
Pass criteria: command exits 0 and output/alicloud-storage-oss-ossutil/validate.txt is generated.
output/alicloud-storage-oss-ossutil/.ossutil config or config file).ossutil ls to list buckets, then list objects using the bucket region.references/install.md for platform-specific install steps.Interactive configuration:
ossutil config
Default config file paths:
~/.ossutilconfigC:\Users\issuser\.ossutilconfigMain configuration fields include:
AccessKey IDAccessKey SecretRegion(example default cn-hangzhou; ask the user if the best region is unclear)Endpoint(optional; auto-derived from region if omitted)Use RAM users/roles with least privilege and avoid passing AK in plain text on command line.
Recommended method (environment variables):
export ALICLOUD_ACCESS_KEY_ID="<your-ak>"
export ALICLOUD_ACCESS_KEY_SECRET="<your-sk>"
export ALICLOUD_REGION_ID="cn-beijing"
ALICLOUD_REGION_ID can be used as default region; if unset choose the most reasonable region, ask user if unclear.
Or use the standard shared credentials file:
~/.alibabacloud/credentials
[default]
type = access_key
access_key_id = <your-ak>
access_key_secret = <your-sk>
ossutil configossutil api put-bucket-aclossutil ls
ossutil ls oss://your-bucket -r --short-format --region cn-shanghai -e https://oss-cn-shanghai.aliyuncs.com
ossutil cp ./local.txt oss://your-bucket/path/local.txt
ossutil cp oss://your-bucket/path/remote.txt ./remote.txt
ossutil sync ./local-dir oss://your-bucket/path/ --delete
ossutil ls
Get target bucket region from output (e.g. oss-cn-shanghai) and convert it to --region format (cn-shanghai).
When listing objects, explicitly set --region and -e to avoid cross-region signature/endpoint errors.
ossutil ls oss://your-bucket \
-r --short-format \
--region cn-shanghai \
-e https://oss-cn-shanghai.aliyuncs.com
4. For very large buckets, limit output size first.
ossutil ls oss://your-bucket --limited-num 100
ossutil ls oss://your-bucket/some-prefix/ -r --short-format --region cn-shanghai -e https://oss-cn-shanghai.aliyuncs.com
Error: region must be set in sign version 4.
region in config file, or pass --region cn-xxx.The bucket you are attempting to access must be addressed using the specified endpoint
-e https://oss-cn-hongkong.aliyuncs.com.Invalid signing region in Authorization header
--region and ; both must match bucket region.OSSUTIL 2.0 overview and install/config:
Official source list:references/sources.md
ALICLOUD_ACCESS_KEY_ID, ALICLOUD_ACCESS_KEY_SECRET, optional ALICLOUD_REGION_ID.Weekly Installs
157
Repository
GitHub Stars
337
First Seen
12 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
gemini-cli156
github-copilot156
codex156
amp156
kimi-cli156
cursor156
Nx Import 使用指南:从源仓库导入代码并保留Git历史
250 周安装
OpenPencil CLI 工具:.fig 设计文件命令行操作与 MCP 服务器 | 设计自动化
250 周安装
学术深度研究技能:AI驱动的学术文献综述与多源验证工具,生成APA格式报告
250 周安装
React PDF 渲染器 - 使用 JSON 生成 PDF 文档,支持自定义组件和流式渲染
250 周安装
后端安全编码专家 | 安全开发实践、漏洞预防与防御性编程技术指南
250 周安装
TanStack Form:高性能无头表单库,支持TypeScript、Zod、Valibot验证
250 周安装
-e