PyCharm hangs on "Identifying Git Version"--Git standalone and GitHub

已回答

I have a fresh install of Windows 10, fresh install of PyCharm 2018.4 Professional, fresh install of Git. I go to version control and set the path to the git executable. I hit "test." Alternatively, I attempt to commit to git. Either way, I get a screen that says "identifying git version." It stays here forever. If I try to cancel, nothing happens. I have to force-kill PyCharm to get out of it. This happens both for the latest standalone version of git as well as GitHub for Windows git. I can't work. What do I do?

1

> I go to version control and set the path to the git executable

What exact path do you specify? Make sure it points to git client, and not bash (e.g. C:\Program Files\Git\cmd\git.exe)

Is there any antivirus installed? Check if disabling it helps.

> identifying git version." It stays here forever

There is a 60 seconds timeout, AFAIK. 

 

1

i do have the same issue that to after the recent update. the

" Identifying Git Version "  just keeps running but no reply popups up and this is just sitting for ever. it dose not autoclose.

And my git is located @ " C:\Program Files (x86)\Git\git-cmd.exe " but phpstrom changes it to " C:\Program Files\Git\git-cmd.exe " on every update

Also if  i use the above " C:\Program Files (x86)\Git\git-cmd.exe " it dose not work but if i use " C:\Program Files (x86)\Git\cmd\git.exe " it works.

0

C:\Program Files (x86)\Git\git-cmd.exe is a shell, not git executable. 

C:\Program Files (x86)\Git\cmd\git.exe is the correcpt path to GIT executable. This is the one that should be used, not git-cmd.exe as it is some auxiliary shell.

1

I recently updated from 2018.1 to 2019.1 and, as soon as I launched PyCharm, it started complaining about Git. I went to Settings and selected the path to git.exe but it doesn't work. Here's what happens:

- If I click test after selecting the path to the executable, the test pop-up opens but nothing happens. There's no signs of progress and the pop-up can't be closed. PyCharm needs to be terminated via Task Manager.

- If I click apply and accept (without running the test), a background process starts to do the test. Same thing. Nothing happens, no progress and no way of stopping. Hitting the button for canceling the background process will change the label to "Stopping - Identifying Git Version" but it will stay there for ever.

I tested this with and without Antivirus / Firewall enabled.

FYI: there's no timeout of any kind.

0

> path to git.exe

What exact path?

The way executable is verified has not changed since 2018.1 - IDe calls git version and waits for output. The only possible cause for the Test to hang is the that the called git process does not finish, or the exit code is not returned to the IDE, but TBH I am not sure if it is possible. Output can be blocked by the antivirus, but not the fact a process has finished.

0

> What exact path?

The location where you installed Git. git.exe is located under the bin folder in the git installation directory.

For me, it all started with PyCharm complaining about not having a Git 2.9+ version installed. So, after updating it to the latest version, I went back to PyCharm and, under the git config, the IDE allows you to manually specify the full path to the git.exe file, and so I did. As I mentioned before, the test never finishes no matter how long you keep it running and despite having the antivirus on or off.

As I said in my previous comment, if you choose not to test and just Apply and then Accept, a background process for identifying the git version will be executed and, of course, it won't finish and you won't be able to stop it. The interesting thing is that if you restart the IDE, everything will work as expected.

0

> under the bin folder

The correct executable of GitForWidnows is C:\Program Files (x86)\Git\cmd\git.exe, not the one from bin. Check if it works.

> if you choose not to test and just Apply and then Accept, a background process for identifying the git version will be executed

That is expected, IDE needs to validate the executable. It does not do that on restart though, so closing the IDE bypasses the check. It is unexpected that other git functionality works, though, as it relies on the same client and needs to get output from it, using the same way validation is done.

If the isseu continues with the correct executable selected, please submit a request to https://youtrack.jetbrains.com/issues/IDEA and attach logs.

> it all started with PyCharm complaining about not having a Git 2.9+ version installed

Could you please clarify where it complains about this? Minimal supported version on Windows is 2.4.

1

请先登录再写评论。