更新macOS后的一系列问题

87 阅读1分钟

更新macOS后的一系列问题

1.git命令无效

xxx@xxx-mac ~ % git --version
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  • 解决办法
  • 执行下面命令
xcode-select --install
  • 会弹窗提示 图片转存失败,建议将图片保存下来直接上传

  • 点击“安装”,根据提示安装即可。

问题解决。

如果你不幸,上述命令无效,那么试试

xcode-select --reset

2.git pull push 报错 no matching host key type found. Their offer ssh-rsa

  • 执行
sudo nano ~/.ssh/config
  • 写入
Host *
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedKeyTypes +ssh-rsa
  • control + x 退出
  • 回车
  • 问题解决