diff --git a/%E9%85%8D%E7%BD%AE-Git-SSH-%E4%B8%8E-Gitea-%E9%9B%86%E6%88%90%E6%8C%87%E5%8D%97.md b/%E9%85%8D%E7%BD%AE-Git-SSH-%E4%B8%8E-Gitea-%E9%9B%86%E6%88%90%E6%8C%87%E5%8D%97.md index ce371b8..4464851 100644 --- a/%E9%85%8D%E7%BD%AE-Git-SSH-%E4%B8%8E-Gitea-%E9%9B%86%E6%88%90%E6%8C%87%E5%8D%97.md +++ b/%E9%85%8D%E7%BD%AE-Git-SSH-%E4%B8%8E-Gitea-%E9%9B%86%E6%88%90%E6%8C%87%E5%8D%97.md @@ -17,6 +17,7 @@ ssh-keygen -t ed25519 -C "your_email@example.com" 1. 登录你的 Gitea 实例:http://175.27.253.162:3000/ 2. 点击右上角用户头像 → Settings(设置) +![图片描述](https://cdn.nlark.com/yuque/0/2025/png/439279/1762324187332-050b0a2b-2442-4e46-b199-190db0ed6251.png?x-oss-process=image%2Fformat%2Cwebp) 3. 在左侧菜单中选择 SSH / GPG 密钥 → 管理 SSH 密钥 4. 打开公钥文件(如 ~/.ssh/id_ed25519.pub),复制其全部内容 ```bash @@ -25,7 +26,9 @@ ssh-keygen -t ed25519 -C "your_email@example.com" 5. 在 Gitea 的 密钥内容文本框中粘贴公钥内容 6. 密钥名称可填写设备名称 7. 点击 **添加密钥** 完成添加 +![图片描述](https://cdn.nlark.com/yuque/0/2025/png/439279/1762324455534-d8183137-45cb-4db0-9f7a-3cc974d658e2.png?x-oss-process=image%2Fformat%2Cwebp) +![图片描述](https://cdn.nlark.com/yuque/0/2025/png/439279/1762324667835-89aed33a-384d-4d06-a38e-a615574c3cbe.png?x-oss-process=image%2Fformat%2Cwebp) # 测试 SSH 连接 在终端运行以下命令测试是否能成功连接到 Gitea 服务器: @@ -37,3 +40,4 @@ ssh -T ssh://git@175.27.253.162:222 Hi username! You've successfully authenticated, but Gitea does not provide shell access. ```` 这表示 SSH 认证已生效。 +![图片描述](https://cdn.nlark.com/yuque/0/2025/png/439279/1762324942291-97dc298e-fc03-47cb-a9fc-cd7d81a79d78.png?x-oss-process=image%2Fformat%2Cwebp)