我正在尝试在docker容器中从源代码构建tensorflow。为了下载一些包,我设置了https://127.0.0.1:8118的docker代理(它指向Tor vi privoxy)。我从此代理中排除了*.github.com
运行后:
bazel build --config=monolithic //tensorflow/tools/pip_package:build_pip_package我得到了以下错误:
ERROR: Analysis of target '//tensorflow/tools/pip_package:build_pip_package' failed; build aborted: error running 'git fetch origin refs/heads/*:refs/remotes/origin/* refs/tags/*:refs/tags/*' while working with @io_bazel_rules_docker我也尝试通过以下方式为git设置代理:
git config --global http.proxy https://127.0.0.1:8118没有成功
发布于 2021-04-07 02:07:24
不需要从代理中排除github。
无论如何,设置git代理都可以解决这个问题,但是它应该是https,而不仅仅是http代理。
git config --global https.proxy https://127.0.0.1:8118如果在docker容器中运行此命令,则必须使用--network=host选项才能使docker识别本地主机IP地址。从网络的角度来看,--net=host选项用于使Docker容器中的程序看起来像是在主机上运行。
https://stackoverflow.com/questions/66973181
复制相似问题