1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

WinのVSCodeでリモートリポジトリにpushできない [Git: Remote: HTTP Basic: Access Denied]

Posted at

対象

WindowsのVisual Studio Code (以下、VSCode)でリモートリポジトリにpush/pullしようとしたときに、次のエラーが出る人向けの解決策

Git: Remote: HTTP Basic: Access Denied

詳細

私の場合は会社の認証Proxy経由で通信しており、この認証パスワードを更新したときに付随して発生したエラーだったので、すぐにそれが原因だと分かった。

当然、Proxy関連の設定項目を見直し、.gitconfig.bashrcのproxyパスワード部分を更新し、PowerShellやコマンドプロンプトからのコマンド直打ちは出来ることを確認していたが、これだけではVSCodeのエラーは解消できなかった。

結論

■Windows資格情報のパスワードを書き換えるべし

VSCodeの設定自体にproxy関連の設定項目はあるが、どうもgit remoteのときはこの設定を参照していない様子。調べてみると、http通信時ではVSCodeはWindows資格情報を使うっぽい。

GitLabのサイトにこんな記事があった。
HTTP Basic Access denied in Visual Studio Code for Gitlab Group Repo.

上のissueでは細々とコマンドが説明されているが、Windowsユーザならばコントロールパネルから「Windows資格情報」の編集画面にいき、リモートリポジトリに関連している項目のパスワード更新するほうが手っ取り早い。

社内IT環境が数世代前の、認証Proxyのパスワードを定期的に変更させようとしてくる企業にお勤めの方の参考になれば…。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?