git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Git submodule first time update with proxy

From
Chris Packham <judge.packham@gmail.com>
Date
Jan 23, 2015, 22:13 UTC
Message-ID
<CAFOYHZAiZkXqSkso+=Eh_THEkh+qi9k8xWsP0yt1dbw5ymwDDQ@mail.gmail.com>
In-Reply-To
<CAHd499BEmV2zeosE9th59QTWPA0CPsU8eyHnONhsZqEb=bH+rA@mail.gmail.com>
Hi,
On Fri, Jan 23, 2015 at 3:50 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:
Show 10 quoted lines
> I have a submodule using HTTP URL. I do this:
>
> $ git submodule init MySubmodule
> $ git submodule update MySubmodule
>
> The 2nd command fails because the HTTP URL cannot be resolved, this is
> because it requires a proxy. I have "http.proxy" setup properly in the
> .git/config of my parent git repository, so I was hoping the submodule
> update function would have a way to specify it to inherit the proxy
> value from the parent config.

Your not the first to suggest it and you probably won't be the last. It is hard to decide _which_ config variables, if any, should propagate from the parent. What works for one use-case may not necessarily work for another.

> How can I set up my submodule?

Probably the easiest thing would be to make your http.proxy configuration global i.e.

  $ git config --global http.proxy ....

If you don't want to make it a global setting you can setup the submodule configuration after running init but before running update i.e.

  $ git submodule init MySubmodule
  $ (cd MySubmodule && git config http.proxy ...)
  $ git submodule update MySubmodule
Previous: Robert DaileyNext: Robert Dailey
Message 2 of 5 in “Git submodule first time update with proxy”
  1. Robert DaileyJan 23, 2015
  2. Chris PackhamJan 23, 2015
  3. Robert DaileyJan 24, 2015
  4. Robert DaileyJan 24, 2015
  5. Chris PackhamJan 24, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.