我在gitlab中使用git。
我无法再从windows pc推送到我的仓库了。 git不再要求密码。
错误:
achita@DESKTOP-IAEDBE2 MINGW64 /c/RachitaData/Git/Projects/Pms (master)
$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
Rachita@DESKTOP-IAEDBE2 MINGW64 /c/RachitaData/Git/Projects/Pms (master)
$ git push -u origin master
fatal: unable to access 'https://gitlab.com/aarfid/aarfidProjects.git/': Failedto connect to gitlab.com port 443: Bad access
修改
Ping命令找不到主机
ping https://gitlab.com/aarfid/aarfidProjects.git
Ping request could not find host https://gitlab.com/aarfid/aarfidProjects.git. Please check the name and try again.
C:\Users\Rachita\Downloads\curl-7.33.0-win64-ssl-sspi>ping gitlab.com
Pinging gitlab.com [104.210.2.228] with 32 bytes of data:
Request timed out.
Ping statistics for 104.210.2.228:
Packets: Sent = 1, Received = 0, Lost = 1 (100% loss),
Control-C
^C
卷曲
C:\Users\Rachita\Downloads\curl-7.33.0-win64-ssl-sspi>curl https://gitlab.com/aarfid/aarfidProjects.git
curl: (7) Failed connect to gitlab.com:443; No error
C:\Users\Rachita\Downloads\curl-7.33.0-win64-ssl-sspi>curl gitlab.com
curl: (7) Failed connect to gitlab.com:80; No error
虽然我可以在浏览器上打开gitlab.com
EDIT1
防火墙设置
C:\Users\Rachita\Downloads\curl-7.33.0-win64-ssl-sspi>netsh advfirewall show currentprofile
Private Profile Settings:
----------------------------------------------------------------------
State ON
Firewall Policy BlockInbound,AllowOutbound
LocalFirewallRules N/A (GPO-store only)
LocalConSecRules N/A (GPO-store only)
InboundUserNotification Enable
RemoteManagement Disable
UnicastResponseToMulticast Enable
Logging:
LogAllowedConnections Disable
LogDroppedConnections Disable
FileName %systemroot%\system32\LogFiles\Firewall\pfirewall.log
MaxFileSize 4096
解
我关闭了防火墙,问题已经按照评论
中的das_j的建议解决了关闭线墙
netsh advfirewall set allprofiles state off
答案 0 :(得分:1)
关闭了防火墙,问题已经按照评论
中的das_j的建议解决了关闭线墙
netsh advfirewall set allprofiles state off
答案 1 :(得分:1)
过去,您只需要保护您的 PC 免受传入连接的影响,现在几乎没有传入连接的威胁,只有传出必须阻止。
默认情况下,我的防火墙阻止了所有传出连接,不幸的是,Windows 防火墙日志完全没用(至少在我的 Windows 10 中,在几台机器上从未写过任何内容)我不得不安装另一个防火墙并禁用 Windows 防火墙以查看实际是什么程序在推送期间尝试连接。
这是我需要允许访问的 3 个
用于 git-credential-manager-core.exe 的端口 53 和 443
用于 git-remote-https.exe 的端口 53 和 443
用于 TortoiseGitProc.exe 的端口 443 和 53
注意:所有这些exe文件都在Git\mingw64\libexec\git-core\
文件夹中
答案 2 :(得分:0)
使用VPN 在 Vpn客户端设置中启用本地网络,并确保您可以远程登录到URL上的443端口。仔细检查您是否要连接到github或gitlab。