【问题标题】:How can I let Git push/pull through Windows 7 Firewall?如何让 Git 推/拉通过 Windows 7 防火墙?
【发布时间】:2014-12-05 12:31:23
【问题描述】:
我的防火墙配置为拒绝所有入站和出站流量,除非规则另有说明。
This answer 建议为git.exe、sh.exe 和ssh.exe 制定规则。所以我做了。甚至bash.exe。
当我运行git pull 时,我看到了:
fatal: unable to access 'https://joncom@bitbucket.org/joncom/my-repo.git/': Failed connect to bitbucket.org:443; No error
如果我默认允许出站连接,一切正常。
我错过了什么规则?
【问题讨论】:
标签:
git
windows-7
firewall
windows-firewall
【解决方案1】:
使用时:
git submodule update
我必须允许 $GIT_BASH_LOCATION/usr/bin/ssh.exe 通过防火墙。在几乎所有其他情况下,它都不会被使用。
【解决方案2】:
我需要为 git-remote-https.exe 添加规则,因为我通过 HTTPS 而不是 SSH 进行身份验证。
在新版本的 git 上,它位于:C:\Program Files\Git\mingw64\libexec\git-core\git-remote-https.exe。
编辑:事实上,我禁用了 git.exe、sh.exe、ssh.exe 和 bash.exe 的规则,但仍然一切正常,所以它们似乎对我的目的来说是不必要的。