LoginSignup
0
0

More than 3 years have passed since last update.

Gitコマンド実行時に、XcodeとiOSのライセンス同意を求められた場合の解決法

Posted at

起きたこと

GithubからLaradocのファイルをコピーしようとするエラーが出た。

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

ライセンスに同意してくれと言われる。

解決策

エラーコードにもあるように、sudo xcodebuild -licenseを叩く

$ sudo xcodebuild -license

パスワードを聞かれるので、入力。下記が表示される。

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のライセンス契約に同意していません。 Xcodeを使用するには、以下の両方のライセンス契約に同意する必要があります。 Enterキーを押して、「/ Applications / Xcode.app / Contents / Resources / English.lproj / License.rtf」にあるライセンス契約を表示します』
と書いてあるので、Enter押下。

ライセンス契約が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] 

『「同意する」と入力すると、ソフトウェア使用許諾契約の条項に同意したことになります。 それらを印刷するために「印刷」と入力するか、キャンセルする他の何か、[同意、印刷、キャンセル]』

上記が出たら、agreeを入力し、Enterを押下。

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

『ライセンス契約は、Xcodeのバージョン情報ボックス、または/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtfで表示できます。』

再度、Gitコマンドを打ってみると実行できました!

0
0
0

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
0
0