修改配置
This commit is contained in:
19
README.md
19
README.md
@@ -94,6 +94,8 @@ vim .env.deploy-test
|
||||
./deploy-test/07-start-frontend.sh
|
||||
```
|
||||
|
||||
> **pc(Electron)依赖安装**:首次在**无 GitHub SSH 密钥**的服务器上部署时,请先执行 `./deploy-test/00-init-tools.sh`(会配置将 GitHub SSH 地址重写为 HTTPS),或见下文「pc 前端 yarn install 失败」。`pc` 目录统一使用 **Yarn**;若存在 `package-lock.json` 会触发 Yarn 混用警告,可删除该文件后仅保留 `yarn.lock`。
|
||||
|
||||
---
|
||||
|
||||
## 配置文件(`.env.deploy-test`)
|
||||
@@ -266,6 +268,23 @@ TENCENT_SDK_SECRET_KEY=xxx
|
||||
|
||||
## 故障排查
|
||||
|
||||
### pc 前端 `yarn install` 失败(Git SSH / Host key verification failed)
|
||||
|
||||
现象示例:`git ls-remote ... ssh://git@github.com/electron/node-gyp.git` → `Host key verification failed` 或 `Could not read from remote repository`。
|
||||
|
||||
| 说明 | 处理 |
|
||||
|------|------|
|
||||
| **锁文件** | 仓库中 `pc/yarn.lock`、`pc/package-lock.json` 已将 `@electron/node-gyp` 的 `resolved` 固定为 **`git+https://github.com/electron/node-gyp.git#...`**(无需 SSH)。请拉取最新代码后再执行 `yarn install`。 |
|
||||
| **环境** | 首次部署请执行 `./deploy-test/00-init-tools.sh`,脚本内会通过 `git config url.*.insteadOf` 将 `git+ssh://`、`ssh://git@github.com/`、`git@github.com:` 重写为 `https://github.com/`。 |
|
||||
| **仍失败** | 手动执行(与 `00-init-tools.sh` 一致):<br>`git config --global url."https://github.com/".insteadOf "git+ssh://git@github.com/"`<br>`git config --global url."https://github.com/".insteadOf "ssh://git@github.com/"`<br>`git config --global url."https://github.com/".insteadOf "git@github.com:"` |
|
||||
| **包管理器** | `pc` 使用 **Yarn**。若同时存在 `package-lock.json`,Yarn 会警告混用锁文件;可删除 `pc/package-lock.json`,仅保留 `yarn.lock`(与团队约定一致即可)。 |
|
||||
|
||||
```bash
|
||||
cd pc && rm -rf node_modules && yarn install
|
||||
```
|
||||
|
||||
### 其他
|
||||
|
||||
```bash
|
||||
# 验证 MongoDB / S3 连接
|
||||
./deploy-test/check-conn.sh
|
||||
|
||||
Reference in New Issue
Block a user