VSCode エラー

VSCodeでエラー fatal Authentication failed for

vscodeでgit pushなどのgitコマンドを行おうとする際に、"fatal Authentication failed for"などのエラーが起こる場合があります。このエラーの原因と解決法について紹介します。

Shou Arisaka
1 分で読める
2021年12月16日

vscodeでgit pushなどのgitコマンドを行おうとする際に、“fatal: Authentication failed for”などのエラーが起こる場合があります。このエラーの原因と解決法について紹介します。

Image

このエラーは最近のgit・githubのアップデートにより、githubにpushするなどする場合にはパスワードの代わりにトークンが必要になったことが主な原因です。

このエラーへの対処方法としては、以下のgit storeコマンドを利用してgithubのcredentialトークンをファイルに記録させることが考えられます。

$ git config credential.helper store
$ git config credential.helper store コマンドを実行してみたところ、プッシュするたびにPATを入力しなくとも、問題なくリポジトリにプッシュできるようになりました。キャッシュは一時的にしか機能しません。 [git - "fatal: Authentication failed for" when pushing to GitHub from Visual Studio Code (1.62.2) - Stack Overflow](https://stackoverflow.com/questions/69979522/fatal-authentication-failed-for-when-pushing-to-github-from-visual-studio-cod)
あるいはvscodeのバージョンを1.62.1にダウングレードすることでもこのエラーは解決可能なようです。
1.62.1にダウングレードすることで解決し、動作しています。 [git - "fatal: Authentication failed for" when pushing to GitHub from Visual Studio Code (1.62.2) - Stack Overflow](https://stackoverflow.com/questions/69979522/fatal-authentication-failed-for-when-pushing-to-github-from-visual-studio-cod)
参考:

git - “fatal: Authentication failed for” when pushing to GitHub from Visual Studio Code (1.62.2) - Stack Overflow

この記事をシェア

Shou Arisaka 2021年12月16日

🔗 リンクをコピー