Add setup steps and troubleshooting guide
Some checks failed
Build and Deploy / test-backend (push) Has been cancelled
Build and Deploy / build-backend (push) Has been cancelled
Build and Deploy / build-admin (push) Has been cancelled
Deploy to Production / build-backend (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled
Some checks failed
Build and Deploy / test-backend (push) Has been cancelled
Build and Deploy / build-backend (push) Has been cancelled
Build and Deploy / build-admin (push) Has been cancelled
Deploy to Production / build-backend (push) Has been cancelled
Deploy to Production / deploy (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
104
SETUP_STEPS.md
Normal file
104
SETUP_STEPS.md
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
# 私有仓库设置步骤(按顺序执行)
|
||||||
|
|
||||||
|
## ⚠️ 重要:必须先创建仓库才能推送
|
||||||
|
|
||||||
|
当前错误 `404 page not found` 表示仓库尚未创建。
|
||||||
|
|
||||||
|
## 📋 完整步骤
|
||||||
|
|
||||||
|
### 步骤 1:创建 Git 仓库(必须)
|
||||||
|
|
||||||
|
1. **打开浏览器**,访问:https://git.quanyu360.cn
|
||||||
|
|
||||||
|
2. **登录**:
|
||||||
|
- 用户名:`admin`
|
||||||
|
- 密码:`ye972030`
|
||||||
|
|
||||||
|
3. **创建新仓库**:
|
||||||
|
- 点击页面上的 **"New Repository"** 或 **"新建仓库"** 按钮
|
||||||
|
- 填写信息:
|
||||||
|
- **Repository Name(仓库名)**: `wecom-ai-assistant`
|
||||||
|
- **Owner(所有者)**: 选择 `admin`(如果可以选择)
|
||||||
|
- **Visibility(可见性)**: 选择 **Private(私有)**
|
||||||
|
- **初始化选项**:
|
||||||
|
- ❌ **不要**勾选 "Initialize this repository with a README"
|
||||||
|
- ❌ **不要**勾选 "Add .gitignore"
|
||||||
|
- ❌ **不要**勾选 "Choose a license"
|
||||||
|
- 点击 **"Create Repository"** 或 **"创建仓库"**
|
||||||
|
|
||||||
|
4. **复制仓库 URL**:
|
||||||
|
- 创建成功后,页面会显示仓库的 Git URL
|
||||||
|
- 格式类似:`https://git.quanyu360.cn/admin/wecom-ai-assistant.git`
|
||||||
|
- **复制这个 URL**
|
||||||
|
|
||||||
|
### 步骤 2:配置并推送代码
|
||||||
|
|
||||||
|
创建仓库后,在 PowerShell 中执行:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# 1. 更新远程仓库 URL(使用创建后显示的实际 URL)
|
||||||
|
git remote remove private
|
||||||
|
git remote add private https://admin:ye972030@git.quanyu360.cn/admin/wecom-ai-assistant.git
|
||||||
|
|
||||||
|
# 2. 验证配置
|
||||||
|
git remote -v
|
||||||
|
|
||||||
|
# 3. 推送代码
|
||||||
|
git push -u private main
|
||||||
|
```
|
||||||
|
|
||||||
|
**注意**:如果创建后的实际 URL 不同,请替换上面的 URL。
|
||||||
|
|
||||||
|
### 步骤 3:验证推送成功
|
||||||
|
|
||||||
|
推送成功后,访问以下 URL 确认:
|
||||||
|
|
||||||
|
**仓库地址**: https://git.quanyu360.cn/admin/wecom-ai-assistant
|
||||||
|
|
||||||
|
应该能看到你的代码文件。
|
||||||
|
|
||||||
|
## 🔍 如果仍然失败
|
||||||
|
|
||||||
|
### 检查仓库路径
|
||||||
|
|
||||||
|
创建仓库后,Git 服务器会显示实际的 Git URL。请确认:
|
||||||
|
|
||||||
|
1. **命名空间是否正确**:
|
||||||
|
- 可能是 `/admin/wecom-ai-assistant.git`
|
||||||
|
- 可能是 `/wecom-ai-assistant.git`
|
||||||
|
- 可能是 `/root/wecom-ai-assistant.git`
|
||||||
|
- 或其他格式
|
||||||
|
|
||||||
|
2. **使用实际 URL**:
|
||||||
|
```powershell
|
||||||
|
# 替换为创建后显示的实际 URL
|
||||||
|
git remote set-url private https://admin:ye972030@实际URL
|
||||||
|
```
|
||||||
|
|
||||||
|
### 检查权限
|
||||||
|
|
||||||
|
确保:
|
||||||
|
- 用户名和密码正确
|
||||||
|
- 用户有创建和推送仓库的权限
|
||||||
|
|
||||||
|
## ✅ 完成后的状态
|
||||||
|
|
||||||
|
成功后,你应该有:
|
||||||
|
|
||||||
|
- ✅ Git 仓库:https://git.quanyu360.cn/admin/wecom-ai-assistant
|
||||||
|
- ✅ 代码已推送
|
||||||
|
- ✅ 可以正常使用 `git push private main` 推送更新
|
||||||
|
|
||||||
|
## 📝 日常使用
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# 推送到私有仓库(默认)
|
||||||
|
git push private main
|
||||||
|
|
||||||
|
# 推送到 GitHub
|
||||||
|
git push origin main
|
||||||
|
|
||||||
|
# 推送到两个仓库
|
||||||
|
git push private main
|
||||||
|
git push origin main
|
||||||
|
```
|
||||||
71
TROUBLESHOOTING.md
Normal file
71
TROUBLESHOOTING.md
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
# 私有仓库推送问题排查
|
||||||
|
|
||||||
|
## 问题:404 page not found
|
||||||
|
|
||||||
|
### 可能的原因
|
||||||
|
|
||||||
|
1. **仓库尚未创建** - 最常见的原因
|
||||||
|
2. **仓库路径不正确** - 路径格式可能不同
|
||||||
|
3. **权限问题** - 用户没有访问权限
|
||||||
|
|
||||||
|
## 解决方案
|
||||||
|
|
||||||
|
### 方案 1:确认仓库是否已创建
|
||||||
|
|
||||||
|
1. 访问:https://git.quanyu360.cn
|
||||||
|
2. 登录(用户名: `admin`,密码: `ye972030`)
|
||||||
|
3. 检查是否存在名为 `wecom-ai-assistant` 的仓库
|
||||||
|
4. 如果不存在,按照 `CREATE_REPO_GUIDE.md` 创建仓库
|
||||||
|
|
||||||
|
### 方案 2:检查正确的仓库路径
|
||||||
|
|
||||||
|
创建仓库后,在仓库页面可以看到实际的 Git URL,格式可能是:
|
||||||
|
|
||||||
|
- `https://git.quanyu360.cn/admin/wecom-ai-assistant.git`
|
||||||
|
- `https://git.quanyu360.cn/wecom-ai-assistant.git`
|
||||||
|
- `https://git.quanyu360.cn/root/wecom-ai-assistant.git`
|
||||||
|
- 或其他格式
|
||||||
|
|
||||||
|
### 方案 3:使用正确的路径更新远程仓库
|
||||||
|
|
||||||
|
找到正确的路径后,更新远程仓库:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# 移除旧的配置
|
||||||
|
git remote remove private
|
||||||
|
|
||||||
|
# 添加正确的路径(替换为实际路径)
|
||||||
|
git remote add private https://admin:ye972030@git.quanyu360.cn/实际路径/wecom-ai-assistant.git
|
||||||
|
|
||||||
|
# 验证
|
||||||
|
git remote -v
|
||||||
|
|
||||||
|
# 推送
|
||||||
|
git push -u private main
|
||||||
|
```
|
||||||
|
|
||||||
|
### 方案 4:测试不同的路径格式
|
||||||
|
|
||||||
|
运行测试脚本:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
.\scripts\test-git-paths.ps1
|
||||||
|
```
|
||||||
|
|
||||||
|
脚本会自动尝试常见的路径格式。
|
||||||
|
|
||||||
|
## 快速检查清单
|
||||||
|
|
||||||
|
- [ ] 已访问 https://git.quanyu360.cn 并登录
|
||||||
|
- [ ] 已创建仓库 `wecom-ai-assistant`
|
||||||
|
- [ ] 已确认仓库的实际 Git URL
|
||||||
|
- [ ] 已使用正确路径配置远程仓库
|
||||||
|
- [ ] 已测试推送代码
|
||||||
|
|
||||||
|
## 获取帮助
|
||||||
|
|
||||||
|
如果仍然无法推送,请提供:
|
||||||
|
|
||||||
|
1. Git 服务器类型(Gitea、GitLab、Gogs 等)
|
||||||
|
2. 创建仓库后显示的实际 Git URL
|
||||||
|
3. 错误信息的完整内容
|
||||||
Reference in New Issue
Block a user