WSL Git not working with PHPStorm 2024.1

I upgraded to PHPStorm 2024.1 and it is now telling me that Git is not installed.

I even tried to manually set the path to the Git binary in WSL and it still didn't work.

4

Hi,

Apparently, you are experiencing the following issue:
https://youtrack.jetbrains.com/issue/IDEA-350185/Cannot-identify-version-of-git-executable-no-response-on-start-up

Please try a workaround from this comment:
https://youtrack.jetbrains.com/issue/IDEA-350185/Cannot-identify-version-of-git-executable-no-response-on-start-up#focus=Comments-27-9662640.0-0

Just in case, I will quote add it here as well:

- Open built-in IDE registry (Help > Find Action > “Registry”);

- Untick wsl.use.remote.agent.for.launch.processes option;

- Restart the IDE.

3

That seems to have fixed the problem. 

Thank you!

0

I had a similar problem.

The first few days it was just really slow and I managed by invalidating the cache (maybe just restarting was enough, who knows now).

But today it was stuck to `updating` under the `local changes` tab and I couldn't use git at all under phpstorm (I usually use it only to check the changes I made, I do everything else in the terminal).

Unticking wsl.use.remote.agent.for.launch.processes solved the problem.

0

Hi There I have a problem with using git on phpStorm and here is the error :

Error updating changes: detected dubious ownership in repository at '//wsl.localhost/Ubuntu/home/user/project/MainProject' To add an exception for this directory, call:  git config --global --add safe.directory '%(prefix)///wsl.localhost/Ubuntu/home/user/project/MainProject'

I added this peoject to safe.directory  but nothing happend . but I can use git on terminal and Vscode.

0

It seems that phpstorm is detecting another git config. 

Can you run this command inside phpstorm terminal and check? 

0

I ran it but still error exist and I cant use phpStorm version control

0

Can you run which git in the terminal please and check is it the same as Settings | Version Control | Git? 

 

 

0

which git path is usr/bin/git but in  PhpStrom settings its auto detect from C://Programfile/……..
and when I set it to //wsl.localhost/Ubuntu/usr/bin/git wsl and git not found.
 

0

Which ide version are you using?

Does restarting WSL help? 

0

请先登录再写评论。