Skip to content

Commit

Permalink
📖 更新文章
Browse files Browse the repository at this point in the history
  • Loading branch information
fxzer committed Nov 30, 2024
1 parent aa8ea1d commit 3530c97
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/FrontEnd/Other/Mac系统环境快速搭建.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,46 @@ git config --global init.defaultBranch main # 初始分支:main
git config --global pull.rebase true # 设置 pull 代码合并策略为 rebase
```

### Github踩坑

```
正克隆到 'json-viewer'...
Connection closed by 20.205.243.166 port 22
致命错误:无法读取远程仓库。
请确认您有正确的访问权限并且仓库存在。
```

**解决办法**

```
ssh -vT [email protected]
output:
OpenSSH_8.6p1, LibreSSL 3.3.6
...
Connection closed by 20.205.243.166 port 22
```

1. 删除 `~/.ssh/github`相关公/私钥对,重新生成
2. 重新生成密钥对,并配置公钥到 [github](https://github.com/settings/ssh/new)

```zsh
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
ssh-keygen -t rsa -C "[email protected]"
```

3. 修改`~/.ssh/config`

```zsh
Host github.com
HostName ssh.github.com
User git
Port 443
IdentityFile ~/.ssh/github
```

### 增强 ZSH 功能: 安装 [ZIMFW](https://github.com/zimfw/zimfw) **** [OhMyZsh](https://ohmyz.sh/)

#### zimfw
Expand Down

0 comments on commit 3530c97

Please sign in to comment.