How to disable git integration talking to my remote git repo?
已回答
Hi,
This seems to be something with the latest update of Pycharm, but the git integration plugin keeps trying to talk to my remote git repo. How can I disable that and just have it use local information that I pull manually? For my use case, this is actually a security risk.
Joshua
请先登录再写评论。
Hey Joshua,
Does disabling VCS background checks work for you? I'm talking about settings under "File | Settings | Version Control | Background"
I've turned off everything that shouldn't be triggered by me. I'll try turning everything else off. Thanks!
That was not sufficient. Pycharm still seems to be trying to do stuff without input from me. (I haven't even touched the window.)
> For my use case, this is actually a security risk.
Could you please clarify what risk is it and why?
> but the git integration plugin keeps trying to talk to my remote git repo
2019.1 brings the Incoming/outgoing indication. To allow this, IDE needs to know if there are commits on the remote. It does this by calling `git ls-remote`, which only shows hashes of the references on the remote, and nothing more (no content of the commits, no commit messages, no author info).
The feature is controlled by the Mark branches that have incoming/outgoing commits in Settings | Version Control | Git
Also, if you by chance have GitToolbox plugin installed, it has a feature to auto-fetch.
> > For my use case, this is actually a security risk.
> Could you please clarify what risk is it and why?
Sure thing. Requests to my git repo and many other things, are gated by my yubikey. When Pycharm makes these requets, it causes my key to flash. I can't tell if this is a valid request from Pycharm or some malware on my machine trying to trick me. A one-to-one relationship with my actions and the yubikey flashing ensures that I can.
> The feature is controlled by the Mark branches that have incoming/outgoing commits in Settings | Version Control | Git
Thanks. I'm betting this is it. I've turned it off.
Thanks for the clarification.
Indeed, if authentication is handled by some third-party tool like yubikey and not IDE, accessing remote repo in the background may cause issues. It is a known problem - please vote for https://youtrack.jetbrains.com/issue/IDEA-208989
Thanks Dimitriy for pointing out GitToolbox plugin for autofetching, that was my issue!
For the record, this also affected me from a security PoV. Because this happens in the background and suppresses dialogues, it was causing SSH authentication failures in the background. This trips fail2ban protection and essentially means that opening an IntelliJ project can lock you out of a server as an unintended side-effect.
I understand this has since been fixed? Either way, I'd request that in the future operations like this that can have side-effects on the outside world require explicit opt-in by a user. I wasted a lot of time trying to work out what was causing the authentication failures.
Hi Adam,
I'm sorry for all the inconvenience.
The issue is in state Fixed, but it's not released yet.
Thanks Vivsurat!
Couldn't find the settings.You'd expect to find the plugin settings under that plugin. Or in the GIT tab.
But in true PHPstorm fashion, it's not in a logical place.
Don't like the fact that these invasive popups are a fact and that you cannot disable it easlily
Update:
You need to disable this for EVERY project..
For PyCharm 2020.2 I had to go to "File > Settings > Version Control > Git" and then set the value of "Explicitly check for incoming commits on remotes" to "Always".