解决安装xcode后git使用报错的问题

本文介绍了解决在使用Xcode过程中遇到的许可协议未同意的问题,通过运行特定命令并逐步确认许可协议完成设置,最终确保Git状态命令可以正常执行。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一、现象:

 

htmlxdeMacBook-Pro:demo htmlx$ git status

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

 

二、解决步骤:

1、按照提示输入sudo xcodebuild -license (有需要输入密码的接着输入电脑的密码,回车)

htmlxdeMacBook-Pro:demo htmlx$ sudo xcodebuild -license

Password:

 

2、不断回车查看协议之类

 

htmlxdeMacBook-Pro:demo htmlx$ sudo xcodebuild -license

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'

Apple Inc.

 

Xcode and Apple SDKs Agreement

...

一直回车或按空格键往下阅读

最后如:

...

8.7     Entire Agreement; Governing Language

This Agreement constitutes the entire agreement between the parties with respect to the use of the Apple Software and Apple Services licensed hereunder and supersedes all prior understandings regarding such subject matter.  Notwithstanding the foregoing, to the extent that You have entered into the Apple Developer Program License Agreement (PLA) with Apple and are validly licensed by Apple to exercise additional rights, or to use additional features or functionality of the Apple Software or Apple Services under the PLA, You acknowledge and agree that the PLA shall govern Your use of such additional rights and privileges.  No amendment to or modification of this Agreement will be binding unless in writing and signed by Apple.  The parties hereto confirm that they have requested that this Agreement and all related documents be drafted in English.  Les parties ont exigé que le présent contrat et tous les documents connexes soient rédigés en anglais. 

EA1421

8/24/16

 

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] 

 

 

3、输入agree进行同意 (如下面第一段的最后单词agree  可对应上一步查看区别)

 

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel] agree 

 

You can view the license agreements in Xcode's About Box, or at /Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf

htmlxdeMacBook-Pro:demo htmlx$

 

 

5、OK  开工。。。

 

htmlxdeMacBook-Pro:demo htmlx$ git status

On branch demo

Your branch is up-to-date with 'origin/demo'.

nothing to commit, working tree clean

htmlxdeMacBook-Pro:demo htmlx$ 

 

 

转载于:https://www.cnblogs.com/waitingbar/p/6692763.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值