【问题标题】:Problem with git proxy work only few minutes after reboot of windows重启Windows后几分钟,git代理工作的问题
【发布时间】:2021-03-02 13:07:58
【问题描述】:

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

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

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

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

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

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

当我遇到此错误时,我会重新启动计算机,然后我可以推入或拉出,但不会出现错误消息[但只会出现几分钟!]。

系统:Windows VPN:开启

Git 重新安装没有帮助。

错误发生在cmd和PyCharm中。

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

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

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

【问题讨论】:

  • 你的机器有杀毒软件吗??
  • 嗯,这台机器上没有外部防病毒软件,可能只有 Windows Defender @RafsanJany
  • 你用 SSH 密钥试过了吗??

标签: windows git proxy


【解决方案1】:

解决方案:

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

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

【讨论】:

    猜你喜欢
    • 2017-12-01
    • 1970-01-01
    • 1970-01-01
    • 2019-04-09
    • 2020-02-27
    • 2016-04-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多