ログってなんぼ

日々のメモです

gitコマンドで「Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.」が出た時の対処

Xcodeをアップデートした時とかかな。

$ git pull


Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

ライセンスに再同意する

$ sudo xcrun cc
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'

上記コマンドをターミナルから実行して、rootパスワードを入力、その後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

内容を確認してagreeと入力

以上。