Gitで401 Authorization Requiredエラー
色々試したけど結局原因は分からず・・・
githubへの接続をhttpsからsshに変更して暫定的に対応
エラー内容
Can't connect to any repository: https://github.com/xxx/yyyy.git(https://github.com/xxx/yyy.git: 401 Authorization Required)
エラー発生環境
- Pleiades All in One Eclipse4.6
 - EGitプラグイン
 
対処方法
githubへの接続をhttpsからsshに変更
- 秘密鍵/公開鍵の生成
- eclipse → ウィンドウ → 設定  → 一般  → ネットワーク接続  → SSH2 → 鍵管理
- DSA鍵の生成
 - 秘密鍵の保管(パスフレーズは空白)
 
 
 - eclipse → ウィンドウ → 設定  → 一般  → ネットワーク接続  → SSH2 → 鍵管理
 - 公開鍵をgithubに登録
- settings → SSH and GPG keys → New SSH key
- 上記で作成した公開鍵を登録
 
 
 - settings → SSH and GPG keys → New SSH key
 - githubへのURLをhttpsからsshに変更
- URLを変更(https://github.com/xxx/yyyy.git → ssh://git@github.com/xxx/yyy.git)
 - ユーザーはgit
 - パスワードは空白
 
 
補足
プロキシを使用している場合はeclipseのsshプロキシ設定が必要
- eclipse → ウィンドウ → 設定  → 一般  → ネットワーク接続
- アクティブ・プロバイダーをマニュアルに変更
 - HTTPSスキーマのプロキシを設定