carthage update したら 2段階認証で怒られた時
Carthage を使ってみようとセットアップして、いざ
carthage update --platform iOS
を実行した時に
Must specify two-factor authentication OTP code.
に遭遇してしまった時の話
環境
OS X El Capitan 10.11.6
git は homebrew で入れた
GitHubの二段階認証は途中から有効にした
発生
とりあえず Alamofire と ObjectMapper を入れようとした
carthage update --platform iOS
*** Fetching ObjectMapper
*** Fetching Alamofire
*** Skipped downloading Alamofire.framework binary due to the error:
Must specify two-factor authentication OTP code.
*** Checking out Alamofire at 3.4.1
*** Skipped downloading ObjectMapper.framework binary due to the error:
Must specify two-factor authentication OTP code.
原因
MacのキーチェーンアクセスにGitHubへのインターネットパスワードが保存されていたのが問題だった。
そのため、キーチェーンアクセスで github.com で検索して出てきた github.com の設定を削除した。
動いた
*** Fetching ObjectMapper
*** Fetching Alamofire
*** Checking out Alamofire at 3.4.1
*** Checking out ObjectMapper at 1.4.0
*** xcodebuild output can be found in /var/folders/40/k7w36q_s24xcznlm5fvl8lvm0000gn/T/carthage-xcodebuild.jmP7V6.log
*** Building scheme Alamofire iOS in Alamofire.xcworkspace
*** Building scheme ObjectMapper-iOS in ObjectMapper.xcworkspace
ではでは