taubyte-auth-and-profile
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAuth and profile
认证与配置文件
Use this skill before cloud, project, resource, clone, push, or GitHub-backed work. The user must be signed in to GitHub through the Tau CLI where that work depends on it.
tau在进行云、项目、资源、克隆、推送或基于GitHub的操作前,请使用此技能。当操作依赖GitHub时,用户必须通过Tau CLI登录GitHub。
tauStop conditions (apply first)
停止条件(优先适用)
Browser-based GitHub login
If login requires the browser (no usable , or still sends the user to the browser):
--tokentau- Tell the user they must finish GitHub authorization in the browser (the agent cannot do it for them).
- Give the exact command to run when that helps.
tau login … - Stop the workflow immediately. Do not continue with other steps, pushes, clones, or repo operations until the user confirms login finished.
tau - Then re-check with .
tau --json current
User will not authenticate
If GitHub-backed work is needed but the user will not run (no account / first machine) or / (existing account) as appropriate: stop and explain that , , clone, and repo registration will fail without auth.
tau login --newtau logintau login <profile_name>tau new projecttau push基于浏览器的GitHub登录
如果登录需要浏览器(没有可用的****,或仍引导用户前往浏览器):
--tokentau- 告知用户他们必须在浏览器中完成GitHub授权(Agent无法代劳)。
- 提供准确的****命令(若有帮助)。
tau login … - 立即停止工作流。在用户确认登录完成前,请勿继续执行其他步骤、推送、克隆或仓库操作。
tau - 之后使用****重新检查状态。
tau --json current
用户拒绝认证
若需要基于GitHub的操作,但用户拒绝根据情况运行**(无账户/首次在该设备使用)或** / (已有账户):停止流程并解释,若未完成认证,、、克隆和仓库注册操作将会失败。
tau login --newtau logintau login <profile_name>tau new projecttau pushPolicy: profile name, token, and non-interactive mode
规则:配置文件名称、令牌与非交互式模式
What actually accepts (confirm with on the installed binary):
tau logintau login --help| Flag | Short | Role |
|---|---|---|
| | Git provider token (e.g. GitHub PAT) for non-browser login when available |
| | Tau profile name |
| | Provider (default |
| — | Create a new profile; implied when no profiles exist |
| | Set as default profile ( |
Usage line: — profile label may be / or the trailing positional.
tau login [command options] <name>--name-n<name>Globals (from ) go before the subcommand, e.g. , per when automating.
tau --helptau --defaults --yes login …taubyte-execution-modesThere is no separate “GitHub username” flag on . Use for the Tau profile name (often the same string as the GitHub handle). Use when you have a PAT for unattended login.
login--name--tokenGitHub handle / profile name
- User already gave a GitHub handle (or explicit profile name): prefer where applicable; set
tau --defaults --yes login …to the name they asked for, or their handle as--nameif they did not specify otherwise; add<profile_name>when a token is available. Do not re-prompt unless unclear or wrong.--token - User did not give a handle when you need it for or repo context: ask in chat before suggesting or running commands. Do not guess or invent a profile name.
--name
Token vs browser
- With a valid , a browser step is usually unnecessary.
--token - Without , expect browser GitHub sign-in → Stop conditions above.
--token
tau logintau login --help| 标志 | 简写 | 作用 |
|---|---|---|
| | Git提供商令牌(例如GitHub PAT),用于无需浏览器的登录(当令牌可用时) |
| | Tau 配置文件名称 |
| | 提供商(默认值为** |
| — | 创建新配置文件;无现有配置文件时自动启用 |
| | 设置为默认配置文件(可使用 |
使用格式: —— 配置文件标签可通过** / 或末尾的**位置参数指定。
tau login [命令选项] <name>--name-n<name>全局参数(来自**)需放在子命令之前,例如,自动化时遵循**规范。
tau --helptau --defaults --yes login …taubyte-execution-modeslogin--name--tokenGitHub用户名/配置文件名称
- 用户已提供GitHub用户名(或明确的配置文件名称):尽可能优先使用**;将
tau --defaults --yes login …设置为用户指定的名称,若未指定则将其用户名作为--name;当有令牌时添加<profile_name>**。除非信息不明确或错误,否则请勿重复提示。--token - 用户未提供用户名但需要用于****或仓库上下文:在对话中询问用户,再建议或运行命令。请勿猜测或自行创建配置文件名称。
--name
令牌 vs 浏览器
- 若有有效的**,通常无需**浏览器步骤。
--token - 若无**,则需通过浏览器完成GitHub登录 → 遵循上述停止条件**。
--token
Workflow
工作流
1. Check current context
1. 检查当前上下文
bash
tau --json currentbash
tau --json current2. If profile is missing or there is no Tau account yet
2. 若缺少配置文件或尚未拥有Tau账户
Standard path: with GitHub (not optional for first account). Apply Policy and Stop conditions before choosing flags.
tau login --newExample (explicit provider and profile name):
bash
tau login --new --provider github --name <profile_name>- If the user should only attach or switch an existing account: or
tau login(positional profile pertau login <profile_name>).tau login --help - If you are automating and have a handle plus PAT: with
tau --defaults --yes login …and--tokenas documented in help.--name
If this path does not use , treat it as browser OAuth → Stop conditions: inform the user, stop, resume only after they confirm, then go to step 3.
--token标准流程:使用GitHub执行**(首次创建账户时必须使用GitHub)。选择参数前需遵循规则和停止条件**。
tau login --new示例(明确指定提供商和配置文件名称):
bash
tau login --new --provider github --name <profile_name>- 若用户仅需关联或切换已有账户:使用**或
tau login(根据tau login <profile_name>**的位置参数指定配置文件)。tau login --help - 若进行自动化操作且已有用户名和PAT:使用**并按帮助文档添加
tau --defaults --yes login …和--token**参数。--name
若此流程未使用,则视为浏览器OAuth登录 → 遵循停止条件:告知用户,停止流程,待用户确认后再恢复,然后进入步骤3。
--token3. After the user confirms login (including any browser step)
3. 用户确认登录完成后(包括任何浏览器步骤)
bash
tau --json currentDo not treat login as complete until the user has confirmed and this check shows a valid profile as expected.
bash
tau --json current在用户确认且该检查显示存在预期的有效配置文件前,请勿认为登录已完成。
Named profile and switching
命名配置文件与切换
Creating a named profile uses the same pattern as in step 2.
tau login --new … --name <profile_name>bash
tau login --new --provider github --name <profile_name>Switching default / context to an existing profile:
bash
tau login <profile_name>Apply the same Policy and Stop conditions as for the first-time flow.
创建命名配置文件的方式与步骤2相同,使用****格式。
tau login --new … --name <profile_name>bash
tau login --new --provider github --name <profile_name>切换默认/上下文至现有配置文件:
bash
tau login <profile_name>需遵循与首次登录流程相同的规则和停止条件。
Quick verify
快速验证
bash
tau --json currentUse after login and whenever you need to confirm which profile is active.
bash
tau --json current登录后或需要确认当前激活的配置文件时使用此命令。