docs: 移除 GitHub origin 远程,文档改为仅 gitea 一个远程
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
d2ff88bc4d
commit
5652ccc2f0
@ -172,21 +172,19 @@ ssh root@8.130.143.54 "pkill RustServer; cd /opt/internet-project && \
|
||||
|
||||
## Git 远程与推送
|
||||
|
||||
仓库有两个远程,代码改完上线后两边都要同步:
|
||||
仓库现在只有一个远程(2026-06-23 起移除了 GitHub `origin`):
|
||||
|
||||
| 远程 | 地址 | 协议 / 认证 | 在 WSL 里能否直接推 |
|
||||
|------|------|-------------|---------------------|
|
||||
| `gitea` | `ssh://gitea@8.130.143.54:2222/cc/PersonalWebApplication.git` | SSH(已配密钥) | ✅ 可直接 `git push gitea main` |
|
||||
| `origin` | `https://github.com/KarCharon/MyOwnWebPage.git` | HTTPS(需账号 / Token) | ⚠️ 非交互环境推不了,要手动 |
|
||||
|
||||
- **gitea**:WSL 里 SSH 密钥已就绪,`git push gitea main` 直接成功。
|
||||
- **GitHub(origin)**:HTTPS 地址在自动化 / 非交互环境里没有凭据会报
|
||||
`could not read Username for 'https://github.com'`。手动推送时,密码要填
|
||||
**Personal Access Token**(不是登录密码)。若想长期免输入,可改用 SSH(前提是
|
||||
GitHub 配过本机公钥):
|
||||
- **GitHub(已移除)**:原 `origin` = `https://github.com/KarCharon/MyOwnWebPage.git`,
|
||||
HTTPS 在非交互环境无凭据会报 `could not read Username for 'https://github.com'`,
|
||||
需手动用 **Personal Access Token**,因此已删除。若以后要恢复,可重新添加并改用 SSH:
|
||||
|
||||
```bash
|
||||
git remote set-url origin git@github.com:KarCharon/MyOwnWebPage.git
|
||||
git remote add origin git@github.com:KarCharon/MyOwnWebPage.git
|
||||
git push origin main
|
||||
```
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user