【问题标题】:502 proxy error while pulling the code from git repo从 git repo 中提取代码时出现 502 代理错误
【发布时间】:2017-08-16 12:29:46
【问题描述】:

我正在编写一个 php 脚本,它首先克隆,然后从 bitbucket git repo 中提取。

它在我的本地机器上运行良好,但在开发服务器上配置了代理,所以每当我尝试在服务器上运行脚本时,它都会给出 “502 代理错误”

当我直接尝试从开发服务器上的命令行克隆时,它可以工作。 一些谷歌链接建议配置全局代理,如

git config --global http.proxy proxyserver:port

我也试过了,但没有通过脚本工作。

请帮忙。

【问题讨论】:

标签: php git github proxy bitbucket


【解决方案1】:

在将 repo 拉入脚本之前,我最终使用了以下命令。

git --config http.proxy=http://proxy_host:proxy_port

【讨论】:

    猜你喜欢
    • 2017-06-05
    • 2017-05-18
    • 2014-08-10
    • 2019-02-23
    • 2023-02-16
    • 2018-09-18
    • 1970-01-01
    • 1970-01-01
    • 2020-10-05
    相关资源
    最近更新 更多