cyrus-setup-github
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 GitHub
GitHub设置
Configures GitHub CLI and git so Cyrus can create branches, commits, and pull requests.
配置GitHub CLI和git,以便Cyrus可以创建分支、提交代码和拉取请求。
Step 1: Check Existing Configuration
步骤1:检查现有配置
Check if is already authenticated:
ghbash
gh 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:
ghGitHub is already configured. Skipping this step.
Skip to completion.
检查是否已经完成身份验证:
ghbash
gh auth status 2>&1如果已通过验证,请检查git配置:
bash
git config --global user.name
git config --global user.email如果身份验证和git配置都已设置完成,请告知用户:
ghGitHub已完成配置,跳过此步骤。
直接跳转到完成部分。
Step 2: Authenticate GitHub CLI
步骤2:GitHub CLI身份验证
If is not authenticated:
ghbash
gh auth loginThis opens an interactive browser flow. Let the user complete it.
After completion, verify:
bash
gh auth status如果未完成身份验证:
ghbash
gh auth login这将打开交互式浏览器流程,请用户完成相关操作。
操作完成后进行验证:
bash
gh 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")
提交上应该显示什么邮箱? (例如:你的邮箱,或无回复地址)
然后进行设置:
bash
git config --global user.name "<name>"
git config --global user.email "<email>"Step 4: Verify
步骤4:验证
bash
gh auth status
git config --global user.name
git config --global user.emailbash
gh auth status
git config --global user.name
git config --global user.emailCompletion
完成
✓ GitHub CLI authenticated ✓ Git identity configured:<<name>>
✓ GitHub CLI已完成身份验证 ✓ Git身份已配置:<<name>>