File size: 2,938 Bytes
676a3be
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# VvvebJs - Hugging Face Deployment Guide

## Environment Variables Configuration

Configure these environment variables in your Hugging Face Space settings:

### Authentication (Required)
```

USER_1_NAME=admin

USER_1_PASSWORD=your_secure_password

USER_2_NAME=editor

USER_2_PASSWORD=another_secure_password

```
Add more users by incrementing the number (USER_3_NAME, USER_3_PASSWORD, etc.)

### Storage Configuration
```

STORAGE_TYPE=github

# Options: 'github', 'kv', 'both'

```

### GitHub Storage (Recommended)
```

GITHUB_TOKEN=ghp_your_github_token

GITHUB_OWNER=your_username

GITHUB_REPO=your_repo_name

GITHUB_BRANCH=main

GITHUB_PATH=pages/

```

### EdgeOne KV Storage (Optional)
```

EDGEONE_KV_API_KEY=your_api_key

EDGEONE_KV_SECRET_KEY=your_secret_key

EDGEONE_KV_ZONE_ID=your_zone_id

EDGEONE_KV_NAMESPACE=vvvebjs

EDGEONE_KV_ENDPOINT=https://edgeone.tencentcloudapi.com

```

## Setup Instructions

1. Create a new Hugging Face Space with Docker
2. Upload this repository 
3. Configure environment variables in Space Settings
4. Deploy and access via Basic Authentication

## Features

- ✅ Docker deployment on Hugging Face
- ✅ GitHub repository as permanent storage
- ✅ EdgeOne KV storage support
- ✅ Multi-user authentication via environment variables
- ✅ Automatic fallback to local storage
- ✅ Dual storage support (GitHub + KV)

## Usage

1. Access your Space URL
2. Enter username/password (configured in environment variables)
3. Create and edit pages using the visual editor
4. Pages are automatically saved to external storage

## 🔧 紧急修复:GitHub 用户名配置错误

### 问题诊断
- ✅ GitHub Token 验证成功
- ❌ 仓库访问失败 (HTTP 404)
- **原因**: `GITHUB_OWNER` 配置错误

### 当前配置问题
```bash

GITHUB_OWNER=CaPaCatptain  # ❌ 错误 - 中间是 "Cat"

```

### 正确配置
```bash

GITHUB_OWNER=CaPaCaptain   # ✅ 正确 - 中间是 "Capt"

```

### 立即修复步骤

1. **在 Hugging Face Space Settings 中更新环境变量**```

   GITHUB_OWNER=CaPaCaptain

   ```

2. **重启 Space**   - 修改环境变量后
   - Space 会自动重启
   - 等待 1-2 分钟

3. **重新测试**   - 访问高级诊断页面
   - 运行完整诊断
   - 应该会看到所有测试通过 ✅

### 验证步骤

修复后,诊断结果应该显示:
- ✅ GitHub Token 验证:有效
- ✅ 仓库访问检查:可访问
- ✅ 分支检查:分支存在  
- ✅ 文件创建权限测试:可以创建文件

### 仓库信息确认
- **正确的仓库 URL**: `https://github.com/CaPaCaptain/VvvebJs_huggingface_db_01`
- **用户名**: CaPaCaptain (注意大小写)
- **仓库名**: VvvebJs_huggingface_db_01



---



**注意**: 这个错误很容易被忽略,因为差异很小(Cat vs Capt),但 GitHub API 对大小写和拼写非常敏感。