vince-winkintel/gitlab-cli-skills

glab-securefile

Manage secure files for CI/CD including upload, update, download, list, and delete operations.

查看源码

使用方法

  1. 复制安装命令,在自己的智能体环境安装前先检查源码包。
  2. 从原始文档核对所需工具、凭据和支持的宿主。
  3. 说明输入材料与期望交付物,并对照来源检查输出。
npx skills add https://github.com/vince-winkintel/gitlab-cli-skills --skill glab-securefile

开始前需了解

  • 安装不包含模型订阅、API 额度或访问文件的权限。
  • 仓库星数和安装量反映活跃情况,不等于独立质量或安全测试。
仓库原始内容

按源仓库内容呈现,保留标题、案例、代码、表格、链接以及原文引用的演示图片。

glab securefile

Overview


  Store up to 100 files for secure use in CI/CD pipelines. Secure files are                                             
  stored outside of your project's repository, not in version control.                                                  
  It is safe to store sensitive information in these files. Both plain text                                             
  and binary files are supported, but they must be smaller than 5 MB.                                                   
                                                                                                                        
         
  USAGE  
         
    glab securefile <command> [command] [--flags]  
            
  COMMANDS  
            
    create <name> <path>                                   Upload a new secure file to a project.
    download [<id> | --id <id> | --name <name>] [--flags]  Download one or more secure files from a project.
    get <id> [--flags]                                     Get details of a secure file by ID.
    list [--flags]                                         List secure files in a project.
    remove [<id> | --id <id> | --name <name>] [--flags]    Remove a secure file from a project.
    update <name> <path> [--flags]                         Update a secure file in a project.
         
  FLAGS  
         
    -h --help                          Show help for this command.
    -R --repo                          Select another repository. Can use either `OWNER/REPO` or `GROUP/NAMESPACE/REPO` format. Also accepts full URL or Git URL.

Quick start

bash
glab securefile --help

glab securefile get requires GitLab 18.0 or later. On older GitLab instances, list or download by ID/name instead of expecting the details endpoint to work.

Downloading secure files

Use --all to download every secure file across all API pages; it is not limited to the first 100 results. Keep checksum verification enabled unless the user explicitly accepts the risk of --no-verify or --force-download.

bash
# Download every secure file to a controlled directory
glab securefile download --all --output-dir ./secure-files -R group/project

# Download one file to an absolute path; glab creates missing parents
glab securefile download 1 --path /tmp/secure/file.txt -R group/project

# Download all files to an absolute directory
glab securefile download --all --output-dir /tmp/secure-files -R group/project

Treat the destination as sensitive, keep it outside version control, and verify the target project before downloading. Absolute --path and --output-dir destinations are supported. For --all, glab rejects server-provided names that could escape the selected output directory.

Removing secure files

Secure-file deletion accepts a positional numeric ID, --id, or an exact file name via --name:

bash
# Interactive confirmation
glab securefile remove 1
glab securefile remove --id 1
glab securefile remove --name signing-certificate.p12

# Approved non-interactive deletion
glab securefile remove --name signing-certificate.p12 --yes

Deletion is permanent. In non-interactive environments, --yes / -y is required. Resolve and verify the intended project with -R/--repo before deleting, and prefer an ID when duplicate or ambiguous naming is possible.

Choose exactly one selector for removal: a positional ID, --id, or --name. Combining selectors is a hard error, so resolve the intended file first and pass only the one selector you want to use.

Updating secure files

Update a secure file by its exact stored name and a local replacement path. The command asks for confirmation unless --yes / -y is set; overwrite is an alias.

bash
# Interactive update
glab securefile update signing-certificate.p12 ./replacement.p12

# Approved non-interactive update in an explicit project
glab securefile update signing-certificate.p12 ./replacement.p12 \
  -R group/project --yes

No update occurs when the content is unchanged. A successful update changes the secure file's ID, so subsequent workflows should resolve/download it by --name or refresh the ID instead of reusing a stale ID. Confirm the target project, file name, and replacement path before bypassing the prompt.

Subcommands

See references/commands.md for full --help output.

按任务相关推荐

来自同一仓库

更多 Skills

全部 Skills
vince-winkintel
社区

gitlab-cli-skills

Comprehensive GitLab CLI (glab) command reference and workflows for all GitLab operations via terminal. Use when user mentions GitLab CLI, glab commands, GitLab automation, MR/issue management via CLI, CI/CD pipeline commands, Artifact Registry token exchange, repo operations, authentication setup, or any GitLab terminal operations. Routes to specialized sub-skills for auth, CI, MRs, issues, releases, repos, and 30+ other glab commands. Triggers on glab, GitLab CLI, GitLab commands, GitLab termi

安装量
1
GitHub Stars
49
最近更新
10月13日
vince-winkintel
社区

glab-api

Make direct GitLab REST API calls for advanced queries and operations not covered by other glab commands. Use when accessing GitLab API endpoints directly, making custom API requests, or fetching data in JSON format. Triggers on API call, REST API, GitLab API, JSON query, advanced query.

安装量
1
GitHub Stars
49
最近更新
10月13日
vince-winkintel
社区

glab-auth

Manage GitLab CLI authentication including login/logout, check auth status, switch accounts, and configure Docker registry access. Use when setting up glab for first time, troubleshooting auth issues, switching GitLab instances/accounts, or configuring Docker to pull from GitLab registry. Triggers on auth, login, logout, authentication, credentials, token, Docker registry.

安装量
1
GitHub Stars
49
最近更新
10月13日
vince-winkintel
社区

glab-repo

Work with GitLab repositories and projects including clone, create, fork, archive, view, update, delete, search, transfer, and member management. Use when managing repo lifecycle, forking projects, cloning repositories, searching for projects, managing collaborators, or configuring repo settings. Triggers on repository, repo, project, clone, fork, create repo, search projects, collaborators.

安装量
1
GitHub Stars
49
最近更新
10月13日