From e72308b56fff3d5fbb00fb0296f57e85c830898f Mon Sep 17 00:00:00 2001 From: evlic Date: Tue, 12 Sep 2023 14:14:17 +0800 Subject: [PATCH] doc: add README --- README.md | 21 +++++++++++++++++++++ config | 15 +++++++++++++++ config.d/git.ssh | 5 +++++ 3 files changed, 41 insertions(+) create mode 100644 README.md create mode 100644 config create mode 100644 config.d/git.ssh diff --git a/README.md b/README.md new file mode 100644 index 0000000..f217d18 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Lab 配置模版仓库 + +> 请参考如下步骤配置您的本地 ssh config + +## 成果预览 + +```sh +ssh lab.evlic.cn +PTY allocation request failed on channel 0 +Hi there, evlic! You've successfully authenticated with the key named login, but Gitea does not provide shell access. +If this is unexpected, please log in with password and setup Gitea under another user. +Connection to lab.gitea.evlic.cn closed. +``` + +## 配置步骤 + +1. [用户设置 / 管理 SSH 密钥](/user/settings/keys) + +2. 查看 SSH 密钥生成文档并妥善保管密钥 +3. 👉 增加密钥 +4. 查看本仓库 [config]() \ No newline at end of file diff --git a/config b/config new file mode 100644 index 0000000..58f38ea --- /dev/null +++ b/config @@ -0,0 +1,15 @@ +Include ~/.orbstack/ssh/config + +# 自定义配置示例 +# Host {name} // 配置快捷名 +# HostName {host} // 指定域名 +# Port {port} // 指定默认端口 +# User {user} // 指定默认用户 +# IdentityFile ~/.ssh/id_rsa // 指定默认密钥文件 + +Include config.d/*.ssh + +ServerAliveInterval 30 +ServerAliveCountMax 100 + + diff --git a/config.d/git.ssh b/config.d/git.ssh new file mode 100644 index 0000000..927ce8c --- /dev/null +++ b/config.d/git.ssh @@ -0,0 +1,5 @@ +Host lab.evlic.cn + HostName lab.gitea.evlic.cn # 指定域名 + Port 10022 # 指定默认端口 + User git # 指定默认用户 + IdentityFile ~/.ssh/{key_file} # 指定默认密钥文件