taubyte-auth-and-profile

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Auth and profile

认证与配置文件

Use this skill before cloud, project, resource, clone, push, or GitHub-backed
tau
work. The user must be signed in to GitHub through the Tau CLI where that work depends on it.

在进行云、项目、资源、克隆、推送或基于GitHub的
tau
操作前,请使用此技能。当操作依赖GitHub时,用户必须通过Tau CLI登录GitHub。

Stop conditions (apply first)

停止条件(优先适用)

Browser-based GitHub login
If login requires the browser (no usable
--token
, or
tau
still sends the user to the browser):
  1. Tell the user they must finish GitHub authorization in the browser (the agent cannot do it for them).
  2. Give the exact
    tau login …
    command to run when that helps.
  3. Stop the workflow immediately. Do not continue with other
    tau
    steps, pushes, clones, or repo operations until the user confirms login finished.
  4. Then re-check with
    tau --json current
    .
User will not authenticate
If GitHub-backed work is needed but the user will not run
tau login --new
(no account / first machine) or
tau login
/
tau login <profile_name>
(existing account) as appropriate: stop and explain that
tau new project
,
tau push
, clone, and repo registration will fail without auth.

基于浏览器的GitHub登录
如果登录需要浏览器(没有可用的**
--token
**,或
tau
仍引导用户前往浏览器):
  1. 告知用户他们必须在浏览器中完成GitHub授权(Agent无法代劳)。
  2. 提供准确的**
    tau login …
    **命令(若有帮助)。
  3. 立即停止工作流。在用户确认登录完成前,请勿继续执行其他
    tau
    步骤、推送、克隆或仓库操作。
  4. 之后使用**
    tau --json current
    **重新检查状态。
用户拒绝认证
若需要基于GitHub的操作,但用户拒绝根据情况运行**
tau login --new
(无账户/首次在该设备使用)或
tau login
** /
tau login <profile_name>
(已有账户):停止流程并解释,若未完成认证,
tau new project
tau push
、克隆和仓库注册操作将会失败

Policy: profile name, token, and non-interactive mode

规则:配置文件名称、令牌与非交互式模式

What
tau login
actually accepts
(confirm with
tau login --help
on the installed binary):
FlagShortRole
--token
-t
Git provider token (e.g. GitHub PAT) for non-browser login when available
--name
-n
Tau profile name
--provider
-p
Provider (default
github
)
--new
Create a new profile; implied when no profiles exist
--set-default
-d
Set as default profile (
--no-set-default
/
--no-d
to disable)
Usage line:
tau login [command options] <name>
— profile label may be
--name
/
-n
or the trailing
<name>
positional.
Globals (from
tau --help
) go before the subcommand, e.g.
tau --defaults --yes login …
, per
taubyte-execution-modes
when automating.
There is no separate “GitHub username” flag on
login
. Use
--name
for the Tau profile name (often the same string as the GitHub handle). Use
--token
when you have a PAT for unattended login.
GitHub handle / profile name
  • User already gave a GitHub handle (or explicit profile name): prefer
    tau --defaults --yes login …
    where applicable; set
    --name
    to the name they asked for, or their handle as
    <profile_name>
    if they did not specify otherwise; add
    --token
    when a token is available. Do not re-prompt unless unclear or wrong.
  • User did not give a handle when you need it for
    --name
    or repo context: ask in chat before suggesting or running commands. Do not guess or invent a profile name.
Token vs browser
  • With a valid
    --token
    , a browser step is usually unnecessary.
  • Without
    --token
    , expect browser GitHub sign-in → Stop conditions above.

tau login
实际支持的参数
(可通过已安装二进制文件的**
tau login --help
**确认):
标志简写作用
--token
-t
Git提供商令牌(例如GitHub PAT),用于无需浏览器的登录(当令牌可用时)
--name
-n
Tau 配置文件名称
--provider
-p
提供商(默认值为**
github
**)
--new
创建新配置文件;无现有配置文件时自动启用
--set-default
-d
设置为默认配置文件(可使用
--no-set-default
/
--no-d
禁用)
使用格式:
tau login [命令选项] <name>
—— 配置文件标签可通过**
--name
/
-n
或末尾的
<name>
**位置参数指定。
全局参数(来自**
tau --help
)需放在子命令之前,例如
tau --defaults --yes login …
,自动化时遵循
taubyte-execution-modes
**规范。
login
命令没有单独的“GitHub用户名”标志。使用**
--name
指定Tau配置文件名称**(通常与GitHub用户名相同)。当有PAT时,使用**
--token
**进行无人值守登录。
GitHub用户名/配置文件名称
  • 用户已提供GitHub用户名(或明确的配置文件名称):尽可能优先使用**
    tau --defaults --yes login …
    ;将
    --name
    设置为用户指定的名称,若未指定则将其用户名作为
    <profile_name>
    ;当有令牌时添加
    --token
    **。除非信息不明确或错误,否则请勿重复提示。
  • 用户未提供用户名但需要用于**
    --name
    **或仓库上下文:在对话中询问用户,再建议或运行命令。请勿猜测或自行创建配置文件名称。
令牌 vs 浏览器
  • 若有有效的**
    --token
    ,通常无需**浏览器步骤。
  • 若无**
    --token
    ,则需通过浏览器完成GitHub登录 → 遵循上述停止条件**。

Workflow

工作流

1. Check current context

1. 检查当前上下文

bash
tau --json current
bash
tau --json current

2. If profile is missing or there is no Tau account yet

2. 若缺少配置文件或尚未拥有Tau账户

Standard path:
tau login --new
with GitHub (not optional for first account). Apply Policy and Stop conditions before choosing flags.
Example (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:
    tau login
    or
    tau login <profile_name>
    (positional profile per
    tau login --help
    ).
  • If you are automating and have a handle plus PAT:
    tau --defaults --yes login …
    with
    --token
    and
    --name
    as documented in help.
If this path does not use
--token
, treat it as browser OAuthStop conditions: inform the user, stop, resume only after they confirm, then go to step 3.
标准流程:使用GitHub执行**
tau login --new
(首次创建账户时必须使用GitHub)。选择参数前需遵循规则停止条件**。
示例(明确指定提供商和配置文件名称):
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
    **参数。
若此流程未使用
--token
,则视为浏览器OAuth登录 → 遵循停止条件:告知用户,停止流程,待用户确认后再恢复,然后进入步骤3。

3. After the user confirms login (including any browser step)

3. 用户确认登录完成后(包括任何浏览器步骤)

bash
tau --json current
Do 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
tau login --new … --name <profile_name>
pattern as in step 2.
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 current
Use after login and whenever you need to confirm which profile is active.
bash
tau --json current
登录后或需要确认当前激活的配置文件时使用此命令。