最新消息:20210917 已从crifan.com换到crifan.org

【已解决】用git下载代码提示:Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

Git crifan 2978浏览 0评论

折腾:

【记录】把已有的PyCharm项目代码加到已有的OSChina的git仓库中

期间,用git去clone代码,结果竟然提示:

➜  sourcecode git clone http://git.oschina.net/runningfast/RunningFast-Server
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

这让我想起了:

最新Xcode刚升级到Xcode 8,但是我还没来得及,在桌面端的图形界面上,再次点击启动Xcode,点击同意升级,所以估计才有此提示。

重新加上sudo去试试:

➜  sourcecode sudo git clone http://git.oschina.net/runningfast/RunningFast-Server
Password:
You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode.
Hit the Enter key to view the license agreements at ‘/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf’

按照提示,去输入aggree,表示同意:

即可继续git的clone代码了:

You can view the license agreements in Xcode’s About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf
Cloning into ‘RunningFast-Server’…
remote: Counting objects: 4, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (4/4), done.
Checking connectivity… done.

【总结】

此处是由于Xcode本地升级为Xcode 8后,但是没有点击桌面端去启动Xcode,没有点击接收升级,

所以此处,在用到git时,git属于Xcode的工具?需要升级,然后在此终端中,以文字的方式去查看协议,输入aggree同意,即可继续(git的clone)操作。

转载请注明:在路上 » 【已解决】用git下载代码提示:Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
97 queries in 0.192 seconds, using 20.09MB memory