How to fix WSL in VS Code not allowing login password in terminal of VS code?

Jonathan Margalit 0 Reputation points
2026-11-20T22:11:07.18+00:00

I have a PC working on Windows 11, and I have installed WSL 2 and need to work on a project via VS code.
I need to make some installations which need password authentication.

When I plug in the password in the windows terminal (which is logged into the WSL2 linux distro) eveything works just fine.
when i try the SAME COMMAND via the VS code terminal (which is also connected to the same WSL2 distro) i get an error in the password authentication phase with "Sorry, try again" error.

I dont understand why is this. i have checked that these are the same distros with the same user. they are. and it doesnt really matter which command i insert there, as long as i need password authentication, it fails.

please help.

Developer technologies | Visual Studio | Other
Developer technologies | Visual Studio | Other

A family of Microsoft suites of integrated development tools for building applications for Windows, the web, mobile devices and many other platforms. Miscellaneous topics that do not fit into specific categories.

0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.