Git配置SSH Key
immki 2025年2月20日 1 分钟阅读 475 次阅读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 更新于 2025年12月21日