解決安裝xcode后git使用報錯的問題


一、現象:

 

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$ 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM