cyrus-setup-gitlab
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCRITICAL: Never use , , or tools on or any file inside . Use only commands (, , etc.) to interact with env files — secrets must never be read into the conversation context.
ReadEditWrite~/.cyrus/.env~/.cyrus/Bashgrepprintf >>重要提示:切勿对或内的任何文件使用、或工具。仅使用命令(如、等)与环境变量文件交互——机密信息绝不能被读取到对话上下文之中。
~/.cyrus/.env~/.cyrus/ReadEditWriteBashgrepprintf >>Setup GitLab
配置GitLab
Configures GitLab CLI and git so Cyrus can create branches, commits, and merge requests.
配置GitLab CLI和git,使Cyrus能够创建分支、提交和合并请求。
Step 1: Check Existing Configuration
步骤1:检查现有配置
Check if is already authenticated:
glabbash
glab auth status 2>&1If authenticated, check git config:
bash
git config --global user.name
git config --global user.emailIf both auth and git config are set, inform the user:
glabGitLab is already configured. Skipping this step.
Skip to completion.
检查是否已完成身份验证:
glabbash
glab auth status 2>&1如果已完成身份验证,检查git配置:
bash
git config --global user.name
git config --global user.email如果身份验证和git配置均已设置,告知用户:
glabGitLab已完成配置。跳过此步骤。
直接跳至完成阶段。
Step 2: Authenticate GitLab CLI
步骤2:GitLab CLI身份验证
If is not authenticated:
glabbash
glab auth loginThis opens an interactive browser flow. Let the user complete it.
For self-hosted GitLab instances, the user can specify the hostname:
bash
glab auth login --hostname gitlab.example.comAfter completion, verify:
bash
glab auth status如果未完成身份验证:
glabbash
glab auth login这会打开一个交互式浏览器流程。请让用户完成该流程。
对于自托管GitLab实例,用户可以指定主机名:
bash
glab auth login --hostname gitlab.example.com完成后,验证状态:
bash
glab auth statusStep 3: Configure Git Identity
步骤3:配置Git身份信息
If git user name or email are not set, ask the user for their preferred values:
What name should appear on commits made by Cyrus? (e.g., your name, or "Cyrus Bot")
What email should appear on commits? (e.g., your email, or a noreply address)
Then set them:
bash
git config --global user.name "<name>"
git config --global user.email "<email>"如果git用户名或邮箱未设置,询问用户偏好的取值:
Cyrus提交的代码中应显示什么名称? (例如:你的姓名,或"Cyrus Bot")
提交中应显示什么邮箱? (例如:你的邮箱,或一个noreply地址)
然后设置这些值:
bash
git config --global user.name "<name>"
git config --global user.email "<email>"Step 4: Verify
步骤4:验证配置
bash
glab auth status
git config --global user.name
git config --global user.emailbash
glab auth status
git config --global user.name
git config --global user.emailCompletion
完成
✓ GitLab CLI authenticated ✓ Git identity configured:<<name>>
✓ GitLab CLI已完成身份验证 ✓ Git身份信息已配置:<<name>>