auth-setup
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoldsky Authentication & Project Setup
Goldsky身份验证与项目设置
Set up the Goldsky CLI, authenticate your account, and configure projects for your pipelines and subgraphs.
完成Goldsky CLI的安装、账户身份验证,并为你的数据管道和子图配置项目。
Prerequisites
前置条件
- macOS, Linux, or WSL (Windows Subsystem for Linux)
- Internet connection
- Goldsky account (sign up at https://app.goldsky.com)
- macOS、Linux或WSL(Windows子系统Linux)
- 网络连接
- Goldsky账户(在https://app.goldsky.com注册)
Authentication Workflow
身份验证流程
Follow this workflow and verify each step. Execute commands and check results.
请遵循此流程并验证每一步。执行命令并检查结果。
Step 1: Check CLI Installation
步骤1:检查CLI安装情况
bash
which goldsky && goldsky --versionSuccess: Path and version displayed (e.g., and )
/usr/local/bin/goldsky13.2.0Not installed: Tell the user to run this in their terminal:
bash
curl https://goldsky.com | shThis requires sudo password entry. Use AskUserQuestion to confirm installation:
Question: "Please run this command in your terminal to install the Goldsky CLI:"
Code block: curl https://goldsky.com | sh
Options:
1. Label: "Done, it's installed"
Description: "I ran the command and the CLI is now installed"
2. Label: "I need help"
Description: "I encountered an error during installation"After confirmation, verify with .
which goldsky && goldsky --versionbash
which goldsky && goldsky --version成功状态: 显示路径和版本(例如: 和 )
/usr/local/bin/goldsky13.2.0未安装: 告知用户在终端中运行以下命令:
bash
curl https://goldsky.com | sh此操作需要输入sudo密码。使用询问用户功能确认安装情况:
问题:"请在终端中运行以下命令安装Goldsky CLI:"
代码块:curl https://goldsky.com | sh
选项:
1. 标签:"已完成,安装成功"
描述:"我已运行命令,CLI现在已安装"
2. 标签:"我需要帮助"
描述:"我在安装过程中遇到了错误"确认后,使用验证安装。
which goldsky && goldsky --versionStep 2: Check Authentication Status
步骤2:检查身份验证状态
bash
goldsky project list 2>&1Already logged in: Output shows a table with project IDs and Names. Skip to Step 4.
Not logged in: Output contains . Continue to Step 3.
Make sure to run 'goldsky login'bash
goldsky project list 2>&1已登录: 输出显示包含项目ID和名称的表格。跳至步骤4。
未登录: 输出包含。继续步骤3。
Make sure to run 'goldsky login'Step 3: Token-Based Login
步骤3:基于Token的登录
Do NOT attempt interactive login. Always use token-based authentication.
Do NOT use AskUserQuestion for token input. Simply ask the user to paste their token directly in the chat:
You're not logged in. Please paste your API token:
(Need a token? Go to https://app.goldsky.com → Settings → API Tokens → Create Token)Wait for the user to paste their token in their next message.
If user says they don't have a token or need help:
Explain the steps:
- Go to https://app.goldsky.com
- Click Settings → API Tokens
- Click "Create Token" and give it a name
- Copy the token (it won't be shown again)
Then ask them to paste it.
Once user provides the token:
Log them in:
bash
goldsky login --token USER_PROVIDED_TOKEN请勿尝试交互式登录。请始终使用基于Token的身份验证方式。
请勿使用询问用户功能来获取Token。直接让用户在聊天中粘贴他们的Token:
你尚未登录。请粘贴你的API Token:
(需要Token?请访问https://app.goldsky.com → 设置 → API Tokens → 创建Token)等待用户在下一条消息中粘贴Token。
如果用户表示没有Token或需要帮助:
解释步骤:
- 访问https://app.goldsky.com
- 点击设置 → API Tokens
- 点击“创建Token”并为其命名
- 复制Token(此Token不会再次显示)
然后请用户粘贴Token。
用户提供Token后:
执行登录:
bash
goldsky login --token USER_PROVIDED_TOKENStep 4: Verify Login
步骤4:验证登录状态
ALWAYS verify after login:
bash
goldsky project listSuccess: Exit code 0, shows table with projects
Failure indicators:
- still appears
Make sure to run 'goldsky login' - or
invalid tokenunauthorized
If verification fails, ask user to generate a new token and repeat Step 3.
登录后必须验证:
bash
goldsky project list成功: 退出码为0,显示包含项目的表格
失败标识:
- 仍显示
Make sure to run 'goldsky login' - 显示或
invalid tokenunauthorized
如果验证失败,请用户生成新Token并重复步骤3。
Completion Summary
完成总结
After successful setup, provide a summary to the user:
undefined设置成功后,向用户提供总结:
undefinedSetup Complete
设置完成
What was done:
- ✓ Goldsky CLI installed (version X.X.X)
- ✓ Authenticated to Goldsky
- ✓ Connected to project: [project-name]
Your available projects:
[List projects from goldsky project list output]
Next steps - try these skills:
- - Set up credentials for pipeline sinks (PostgreSQL, ClickHouse, Kafka)
/secrets - Ask "create a pipeline" to start building data pipelines
- Ask "deploy a subgraph" to deploy a subgraph to Goldsky
undefined已完成操作:
- ✓ Goldsky CLI已安装(版本X.X.X)
- ✓ 已通过Goldsky身份验证
- ✓ 已连接至项目:[项目名称]
你的可用项目:
[从goldsky project list输出中列出项目]
下一步 - 尝试这些技能:
- - 为管道输出端(PostgreSQL、ClickHouse、Kafka)设置凭据
/secrets - 询问“创建管道”以开始构建数据管道
- 询问“部署子图”以将子图部署至Goldsky
undefinedCommand Reference
命令参考
| Command | Purpose | Key Flags |
|---|---|---|
| Authenticate with Goldsky | |
| Remove local credentials | |
| List all projects you belong to | |
| Create a new project | |
| List users in current project | |
| Invite user to project | |
| 命令 | 用途 | 关键参数 |
|---|---|---|
| 通过Goldsky进行身份验证 | |
| 移除本地凭据 | |
| 列出你所属的所有项目 | |
| 创建新项目 | |
| 列出当前项目中的用户 | |
| 邀请用户加入项目 | |
Common Patterns
常见操作示例
Create a New Project
创建新项目
bash
goldsky project create --name "my-new-project"bash
goldsky project create --name "my-new-project"Invite Team Members
邀请团队成员
bash
goldsky project users invite --emails user@example.com --role EditorAvailable roles: , , ,
OwnerAdminEditorViewerbash
goldsky project users invite --emails user@example.com --role Editor可用角色: , , ,
OwnerAdminEditorViewerSwitching accounts
切换账户
bash
goldsky logout
goldsky loginbash
goldsky logout
goldsky loginMUST verify after: goldsky project list
必须验证:goldsky project list
undefinedundefinedError Patterns
错误特征
| Pattern | Meaning |
|---|---|
| Not authenticated |
| Token is incorrect or expired |
| User lacks required role |
| Need to re-authenticate |
| 错误特征 | 含义 |
|---|---|
| 未进行身份验证 |
| Token不正确或已过期 |
| 用户缺少所需角色权限 |
| 需要重新进行身份验证 |
Troubleshooting
故障排查
| Issue | Action |
|---|---|
| Not logged in | Prompt user for API token, use |
| Invalid token | Ask user to generate a new token in dashboard |
| Permission denied | User needs role upgrade from project Owner/Admin |
| Session expired | Prompt for new token and re-authenticate |
| 问题 | 解决操作 |
|---|---|
| 未登录 | 提示用户提供API Token,使用 |
| Token无效 | 请用户在控制台生成新的Token |
| 权限不足 | 用户需要项目所有者/管理员提升角色权限 |
| 会话过期 | 提示用户提供新Token并重新进行身份验证 |
Related
相关技能
After authentication is complete, suggest next steps:
- — Build and deploy a new pipeline interactively
/turbo-builder - — Find the right dataset for your use case
/datasets - — Set up credentials for pipeline sinks (PostgreSQL, ClickHouse, Kafka, etc.)
/secrets
身份验证完成后,建议下一步操作:
- — 交互式构建并部署新管道
/turbo-builder - — 为你的使用场景找到合适的数据集
/datasets - — 为管道输出端(PostgreSQL、ClickHouse、Kafka等)设置凭据
/secrets