carthage update で "Bad credentials" になった時の対応

## 経緯

久しぶりに`carthage update`したら `"Bad credentials"` で少しハマった。

```bash:cartfile
github "Krimpedance/KRProgressHUD" == 3.4.0
github "SwiftyJSON/SwiftyJSON" == 4.2.0
github "Alamofire/Alamofire" ~> 4.4
github "TheLevelUp/ZXingObjC" == 3.5.0
github "ashleymills/Reachability.swift" == 4.3.0
```

```bash
$ carthage update --platform iOS                                                                            
Please update to the latest Carthage version: 0.34.0. You currently are on 0.33.0
*** Fetching KRProgressHUD
*** Fetching Reachability.swift
*** Fetching ZXingObjC
*** Fetching SwiftyJSON
*** Fetching Alamofire
*** Fetching KRActivityIndicatorView
*** Checking out KRActivityIndicatorView at "3.0.0" 
*** Checking out Alamofire at "4.9.1" 
*** Checking out SwiftyJSON at "4.2.0" 
*** Checking out ZXingObjC at "3.5.0" 
*** Checking out Reachability.swift at "v4.3.0" 
*** Checking out KRProgressHUD at "3.4.0" 
*** xcodebuild output can be found in /var/folders/zc/578tdlfj5y5_63cwhc1kb6ww0000gn/T/carthage-xcodebuild.DsvTh0.log
*** Skipped downloading Alamofire.framework binary due to the error:
    "Bad credentials" 
*** Skipped downloading KRActivityIndicatorView.framework binary due to the error:
    "Bad credentials" 
*** Skipped downloading KRProgressHUD.framework binary due to the error:
    "Bad credentials" 
*** Skipped downloading Reachability.swift.framework binary due to the error:
    "Bad credentials" 
*** Skipped downloading ZXingObjC.framework binary due to the error:
    "Bad credentials" 
*** Skipped downloading SwiftyJSON.framework binary due to the error:
    "Bad credentials" 
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "KRActivityIndicatorView" in KRActivityIndicatorView.xcodeproj
*** Building scheme "KRProgressHUD" in KRProgressHUD.xcodeproj
*** Building scheme "Reachability" in Reachability.xcodeproj
*** Building scheme "SwiftyJSON iOS" in SwiftyJSON.xcworkspace
*** Building scheme "iOS Framework" in ZXingObjC.xcodeproj
```

## 原因

GitHub credential でミスってるようだ。
https://stackoverflow.com/questions/39578496/carthage-error-bad-credentials

以前、Githubのアカウント名を変更したのだが、Keychainを確認したら、古いアカウント名で登録されたままだった。

## 解決方法

1. ~/gitconfigにGitHub credential情報を記載する。  
or
1. KeychainからGitHub credential formを削除する。

↓を参考に2の方法をやってみる。
https://help.github.com/ja/github/using-git/updating-credentials-from-the-osx-keychain

## 結果

再度実行。 `"Bad credentials"` が出なかった。

```bash
$ carthage update --platform iOS                                                                 
Please update to the latest Carthage version: 0.34.0. You currently are on 0.33.0
*** Fetching Alamofire
*** Fetching Reachability.swift
*** Fetching ZXingObjC
*** Fetching KRProgressHUD
*** Fetching SwiftyJSON
*** Fetching KRActivityIndicatorView
*** Checking out SwiftyJSON at "4.2.0" 
*** Checking out KRActivityIndicatorView at "3.0.0" 
*** Checking out KRProgressHUD at "3.4.0" 
*** Checking out ZXingObjC at "3.5.0" 
*** Checking out Reachability.swift at "v4.3.0" 
*** Checking out Alamofire at "4.9.1" 
*** xcodebuild output can be found in /var/folders/zc/578tdlfj5y5_63cwhc1kb6ww0000gn/T/carthage-xcodebuild.J6U96V.log
*** Building scheme "Alamofire iOS" in Alamofire.xcworkspace
*** Building scheme "KRActivityIndicatorView" in KRActivityIndicatorView.xcodeproj
*** Building scheme "KRProgressHUD" in KRProgressHUD.xcodeproj
*** Building scheme "Reachability" in Reachability.xcodeproj
*** Building scheme "SwiftyJSON iOS" in SwiftyJSON.xcworkspace
*** Building scheme "iOS Framework" in ZXingObjC.xcodeproj
```

## 参考

https://stackoverflow.com/questions/39578496/carthage-error-bad-credentials
https://help.github.com/ja/github/using-git/updating-credentials-from-the-osx-keychain