LoginSignup
30
14

More than 3 years have passed since last update.

gitコマンド実行時にライセンス同意(Xcode/iOS)を要求された場合の対処法

Posted at

概要

個人的メモ。
gitコマンドを叩いた時にXcode/iOS関連のライセンスに同意するよう言われたので対応した。
※実行環境はMacOS Mojave

事象

$ git status

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

こんな感じでライセンスに同意してねと言われる。

対応手順

xcodebuildコマンドを実行

$ sudo xcodebuild -license

Enter押下でライセンス情報を表示

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'

ライセンス情報を確認する

Xcode and Apple SDKs Agreement

PLEASE SCROLL DOWN AND READ ALL OF THE FOLLOWING TERMS AND CONDITIONS 

〜〜

Software License Agreements Press 'space' for more, or 'q' to quit

SpaceかEnter押下で読み進める。
q押下だとライセンス情報を閉じてしまうので注意。

ライセンスに同意する

ライセンス情報を最後まで表示すると確認メッセージが表示される。
agreeを入力し、Enter押下。

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] 

同意が完了すると以下のメッセージが表示される。

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

動作確認

$ git status

正常にコマンド実行できたら、全行程完了。

30
14
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
30
14