git通过http代理获取ubuntu内核源码

git通过http代理获取ubuntu内核源码

我尝试运行以下命令在 ubuntu 12.04 中获取内核源代码。

git clone git://kernel.ubuntu.com/ubuntu/ubuntu-precise.git

由于我的机器在私有网络中,我需要设置 http 代理才能访问公共网络。但即使我运行以下命令,git 仍然无法获取代码。有人可以告诉我如何为 git 设置 http 代理吗?

git config --global http.proxy http://<my proxy server>:80

此致敬意,CY。

答案1

好的,我得到了答案 https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide

我可以使用http协议来进行克隆。

git 克隆http://kernel.ubuntu.com/git-repos/ubuntu/ubuntu-precise.git/

相关内容