Bitbucket+tortoiseGIT 突然アクセスを拒否されるエラーが発生(解決済)
数日ぶりにfetchしようとしたら以下のエラーが発生し、
リモートからデータが取得できなくなってしまっていた。
発生したエラー
git.ext fetch -v --progress "origin"
Server refused our key
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
えええ…
エラー解消の為に試したこと
1. tortoiseGit Settingの設定を見直し
→特に問題ない
2. 鍵を新しいものに作り変え、Bitbucketに登録
C:\~略~\TortoiseGit¥pageant.exeにも登録、起動確認
→引き続き同じエラーが発生
解決方法
結論から言うと、Puttyの"標準の設定"(Default Settings)の設定を弄ってしまっていたのが原因だった。
"標準設定"セッションに誤って登録してしまっていた別環境の接続情報および秘密鍵を削除
→エラー解消!
[参考]
Sourcetree for Windows keep telling me the "server refused our key"
https://community.atlassian.com/t5/Questions/Sourcetree-for-Windows-keep-telling-me-the-quot-server-refused/qaq-p/192498
*蛇足
こちらの記事にデバック手順が載っていたので試してみた
1.コマンドプロンプト起動
2.PuTTy付属のplink.exeのあるフォルダまで移動
cd C:\~略~\PuTTY
plink.exeがなければこちらからダウンロード
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
3.plink.exe -v git@bitbucket.org
4.PuTTyの設定が間違っていれば、上記コマンド結果が
Network error: Connection refused
FATAL ERROR: Network error: Connection refused
となる
標準の設定修正後はこちらも正常に接続できるようになった
粗忽者だと無駄に時間がかかるorz