首页 > 技术文章 > Accept Xcode/iOS License to run git

googlegis 2018-10-24 11:08 原文

在没有安装Xcode的情况下, 使用了 webstorm 的git,提示

安装xcode,安装完成后,并没有打开xcode,而是再次使用git,发现

提示 

输入以下命令行:

sudo xcodebuild -license

Agreeing to the Xcode/iOS license requires admin privileges, please re-run the command。

意思就是说,虽然安装了Xcode,但是并没有同意使用协议之类的,需要同意协议后,再次运行git相关命令。

 

在命令行中输入 sudo xcodebuild -license , 按照提示,输入agree。

 

然后再次在webstorm中运行 git 还是同样错误。 最后重启mac,OK!

 

终于正常了。

 

不过一事不明, IDEA 在不安装 xcode就可以使用git,为什么webstorm不可以?

 

推荐阅读