git 代理在 windows 重新启动几分钟后才工作的问题

Problem with git proxy work only few minutes after reboot of windows

我公司笔记本电脑上的 git 代理有一些问题。

我在系统变量中添加了环境变量HTTP_PROXY、HTTPS_PROXY和一个FTP_PROXY

重新启动后,我的 git 可以正常工作几分钟,一切正常 - 推送工作,我可以拉取所有内容。

但是笔记本电脑工作几分钟后我遇到错误:

Push failed unable to access 'https://gitlab.****.com/**/**/': Proxy CONNECT aborted

我不知道该怎么做我已经尝试将 git 配置变量取消设置为 http.proxy、https.proxy,但它没有任何改变。

当我遇到这个错误时,我执行了计算机重启,我能够推或拉并且错误消息没有出现[但只出现了几分钟!]。

系统:Windows VPN:开启

Git 重新安装没有帮助。

错误出现在cmd和PyCharm中。

Git user.name 和 user.email 是正确的。

我也尝试使用 http.proxy 和 https.proxy 作为 http://login:pwd@server:port 并且它没有任何改变。

请帮助我,谢谢和最诚挚的问候。

解决方案:

  • 重新安装git
  • 在 ../Git/etc/gitconfig
  • 中将 credential.helper 设置为管理核心
  • 将环境变量设置为小写字母 ftp_proxy、http_proxy、https_proxy 并为每个变量使用相同的 'http://' 前缀
  • 删除所有 windows 具有 git 的凭据:前缀,
  • 从 git 配置中删除 http.proxy --global -l、--system 和 --local
  • https://gitlab.domain.com
  • 添加 windows 凭据(通用)

如果不起作用,请重新安装 windows 并重试。