How can I let Git push/pull through Windows 7 Firewall?
Asked Answered
R

4

10

My firewall is configured to deny all inbound and outbound traffic unless a rule says otherwise.

Firewall Profile Screenshot

This answer suggests making rules for git.exe, sh.exe, and ssh.exe. So I did. Even bash.exe.

Firewall Rules Screenshot

Still when I run git pull I see:

fatal: unable to access 'https://[email protected]/joncom/my-repo.git/': Failed connect to bitbucket.org:443; No error

If I allow outbound connections by default, everything works.

Firewall Profile Screenshot

What rule am I missing?

Rap answered 10/10, 2014 at 10:49 Comment(0)
R
26

I needed to add a rule for git-remote-https.exe because I'm authenticating via HTTPS, not SSH.

On new versions of git, this is located at: C:\Program Files\Git\mingw64\libexec\git-core\git-remote-https.exe.

Edit: In fact I disabled the rules for git.exe, sh.exe, ssh.exe, and bash.exe, and still everything works, so they seem unnecessary for my purposes.

Rap answered 10/10, 2014 at 10:49 Comment(1)
I used the logging technique from here (serverfault.com/a/841940) to determine that indeed only git-remote-https.exe needs to be allowed (Outbound rule) in order to get https working on Windows 7.Sharp
A
2

When using:

git submodule update

I had to allow $GIT_BASH_LOCATION/usr/bin/ssh.exe through the firewall. In almost all other cases it is not used.

Anchie answered 19/1, 2018 at 5:33 Comment(0)
B
0

I had the same problem but since I don't have a git-remote-https.exe I needed to open the Ports for git. You need to open the ones described in this question here.

Battleship answered 25/2, 2017 at 6:31 Comment(0)
A
0

If you're using Git for Windows and Putty, you should allow plink.exe

Arrearage answered 2/6, 2023 at 7:1 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.