28 lines
581 B
Markdown
28 lines
581 B
Markdown
---
|
|
title: github ssh timeout
|
|
createTime: 2024/01/21 20:00:26
|
|
tags:
|
|
- git
|
|
categories:
|
|
- 随记
|
|
---
|
|
|
|
[参考](https://github.com/orgs/community/discussions/88410#discussioncomment-8151064)
|
|
|
|
该方法需要先检查是否可以直接访问/通过代理访问 github
|
|
|
|
1. 在 `C:\Users\{username}\.ssh` 目录下创建 or 编辑 `config` 文件。
|
|
|
|
2. 将以下内容复制到 config
|
|
|
|
```ssh-config
|
|
Host github.com
|
|
User git
|
|
Hostname ssh.github.com
|
|
PreferredAuthentications publickey
|
|
IdentityFile ~/.ssh/id_rsa
|
|
Port 443
|
|
```
|
|
|
|
3. 使用 `ssh -T git@github.com` 命令测试连接
|