一、Mac13系统升级后git命令报Permission denied (publickey)
问题原因
gitlab上面推荐的ssh密钥类型是rsa,但Mac13系统这种加密类型无效了,需要换一种加密类型
ssh命令样式
ssh-keygen -t rsa -P "" -C "123456789@qq.com"
# -t: 指定密钥类型
# -P: 指定密码(空字符串表示ssh连接时不需要输入密码)
# -C: 注释,一般为gitlab用户的邮箱信息
解决方法
换一种加密类型:ed25519
生成密钥:ssh-keygen -t ed25519 -P "" -C "123456789@qq.com"
查看密钥:cat ~/.ssh/id_ed25519.pub
复制密钥:pbcopy < ~/.ssh/id_ed25519.pub
二、Mac 升级完系统报xcrun: error: invalid active developer path
问题原因
升级完xcode命令行出错了,需要重新安装xcode命令行
解决方法
运行下面命令,然后按钮提示安装xcode命令行
xcode-select --install