Git配置SSH Key

2025年2月20日 1 分钟阅读 478 次阅读

Git配置SSH Key的时候提示密钥无效

错误提示:Key is invalid. You must supply a key in OpenSSH public key format
翻译:密钥无效。必须提供OpenSSH公钥格式的密钥

解决方案

生成公钥

ssh-keygen -t rsa -C "GitHub账号的注册邮箱"

进入路径

vim ~/.ssh/id_rsa.pub

复制公钥到GitHub设置SSH and GPG keys中的SSH keys


其他内容:

查询公钥

cat ~/.ssh/id_rsa.pub
更新于 2026年2月11日
评论 (0)

评论 (0)

发表评论

暂无评论,快来抢沙发吧~