有什么方法可以让git直接与.pac(代理自动配置)脚本一起使用?

编程入门 行业动态 更新时间:2024-10-27 09:37:49
本文介绍了有什么方法可以让git直接与.pac(代理自动配置)脚本一起使用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我的公司网络使用PAC脚本.( proxyconf.xxx.yy-ss/proxy.pac ).

My corporate network works with a PAC script.(proxyconf.xxx.yy-ss/proxy.pac).

在"git config"命令中使用PAC脚本不起作用."git配置--global http.proxy proxyconf.xxx.yy-ss/proxy.pac "

Using the PAC script in the "git config" command does not work. "git config --global http.proxy proxyconf.xxx.yy-ss/proxy.pac"

我通过下载proxy.pac脚本(100个奇数条目),选择了最通用的(通常是最底端的)代理,并在"git config --global http.proxy"中将其与我的凭据一起使用来使其工作命令.

I got it to work by downloading the proxy.pac script (100 odd entries), selecting the most generic (usually the bottom most) proxy, and using it with my credentials in the "git config --global http.proxy" command.

我已经问过有关通过代理服务器使git工作的问题:

I have already asked about making git work through a proxy server:

  • 将git与代理服务器一起使用

如何做我是通过HTTP代理从Git存储库中拉出的吗?

但以上问题并未提及PAC脚本.

but the above questions make no mention of PAC scripts.

是否可以直接使用proxy.pac脚本进行某些设置?

Is there some setting with which I can directly use the proxy.pac script?

推荐答案

您需要配置git并使其引用您自己的代理服务器,其中一个使用PAC文件.

You would need to configure git and make it reference your own proxy server, one using your PAC file.

例如查看> liangqing/PacProxy >

使用PAC文件决定如何转发请求的袜子代理服务器

A socks proxy server that use PAC file to decide how to forward request

  • 实现一个袜子服务器(支持socks4和socks5,无身份验证模块)
  • 使用PAC文件来决定如何转发请求

如"使用带有git的袜子代理进行http传输中所述,您需要将git配置为:

As mentioned in "Using a socks proxy with git for the http transport", you need to configure git as:

git config --global http.proxy 'socks5://127.0.0.1:9999'

无需配置 https.proxy :这在Git代码库中不存在.

更多推荐

有什么方法可以让git直接与.pac(代理自动配置)脚本一起使用?

本文发布于:2023-11-23 11:19:01,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1621262.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:有什么   脚本   方法   git   pac

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!