Windows 用户建议使用 Windows PowerShell 或者 Git Bash,在 命令提示符 下无 cat 和 ls 命令
ssh-keygen 生成 SSH Key: ssh-keygen -t ed25519 -C "Gitee SSH Key" -t :key类型-C :注释 中间通过按三次回车键确定(可以不需要输入什么) 查看生成的 SSH 公钥和私钥:ls ~/.ssh/ 显示输出: id_ed25519 id_ed25519.pub id_ed25519:私钥文件id_ed25519.pub:公钥文件 读取公钥文件:cat ~/.ssh/id_ed25519.pub ssh-ed25519 AAAA***5B Gitee SSH Key,复制该内容就行。 参考资料: gitee|SSH 公钥设置