{"thread":{"id":"38439","subject":"Git submodule first time update with proxy","startedAt":"2015-01-23T02:50:45Z","lastAt":"2015-01-24T05:47:10Z","messageCount":5,"participants":["Robert Dailey","Chris Packham"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"255162","messageId":"CAHd499BEmV2zeosE9th59QTWPA0CPsU8eyHnONhsZqEb=bH+rA@mail.gmail.com","threadId":"38439","inReplyTo":null,"subject":"Git submodule first time update with proxy","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-01-23T02:50:45Z","receivedAt":"2015-01-23T02:50:45Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"I have a submodule using HTTP URL. I do this:\n\n$ git submodule init MySubmodule\n$ git submodule update MySubmodule\n\nThe 2nd command fails because the HTTP URL cannot be resolved, this is\nbecause it requires a proxy. I have \"http.proxy\" setup properly in the\n.git/config of my parent git repository, so I was hoping the submodule\nupdate function would have a way to specify it to inherit the proxy\nvalue from the parent config.\n\nHow can I set up my submodule?\n"},{"id":"255229","messageId":"CAFOYHZAiZkXqSkso+=Eh_THEkh+qi9k8xWsP0yt1dbw5ymwDDQ@mail.gmail.com","threadId":"38439","inReplyTo":"CAHd499BEmV2zeosE9th59QTWPA0CPsU8eyHnONhsZqEb=bH+rA@mail.gmail.com","subject":"Re: Git submodule first time update with proxy","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2015-01-23T22:13:51Z","receivedAt":"2015-01-23T22:13:51Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"Hi,\n\nOn Fri, Jan 23, 2015 at 3:50 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> I have a submodule using HTTP URL. I do this:\n>\n> $ git submodule init MySubmodule\n> $ git submodule update MySubmodule\n>\n> The 2nd command fails because the HTTP URL cannot be resolved, this is\n> because it requires a proxy. I have \"http.proxy\" setup properly in the\n> .git/config of my parent git repository, so I was hoping the submodule\n> update function would have a way to specify it to inherit the proxy\n> value from the parent config.\n\nYour not the first to suggest it and you probably won't be the last.\nIt is hard to decide _which_ config variables, if any, should\npropagate from the parent. What works for one use-case may not\nnecessarily work for another.\n\n> How can I set up my submodule?\n\nProbably the easiest thing would be to make your http.proxy\nconfiguration global i.e.\n\n  $ git config --global http.proxy ....\n\nIf you don't want to make it a global setting you can setup the\nsubmodule configuration after running init but before running update\ni.e.\n\n  $ git submodule init MySubmodule\n  $ (cd MySubmodule && git config http.proxy ...)\n  $ git submodule update MySubmodule\n"},{"id":"255249","messageId":"CAHd499A+K=uh=wt4P_qy+8XOEttTziJEPvhE+=03oD_MRxna2Q@mail.gmail.com","threadId":"38439","inReplyTo":"CAFOYHZAiZkXqSkso+=Eh_THEkh+qi9k8xWsP0yt1dbw5ymwDDQ@mail.gmail.com","subject":"Re: Git submodule first time update with proxy","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-01-24T04:23:46Z","receivedAt":"2015-01-24T04:23:46Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Fri, Jan 23, 2015 at 4:13 PM, Chris Packham <judge.packham@gmail.com> wrote:\n> Hi,\n>\n> On Fri, Jan 23, 2015 at 3:50 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>> I have a submodule using HTTP URL. I do this:\n>>\n>> $ git submodule init MySubmodule\n>> $ git submodule update MySubmodule\n>>\n>> The 2nd command fails because the HTTP URL cannot be resolved, this is\n>> because it requires a proxy. I have \"http.proxy\" setup properly in the\n>> .git/config of my parent git repository, so I was hoping the submodule\n>> update function would have a way to specify it to inherit the proxy\n>> value from the parent config.\n>\n> Your not the first to suggest it and you probably won't be the last.\n> It is hard to decide _which_ config variables, if any, should\n> propagate from the parent. What works for one use-case may not\n> necessarily work for another.\n>\n>> How can I set up my submodule?\n>\n> Probably the easiest thing would be to make your http.proxy\n> configuration global i.e.\n>\n>   $ git config --global http.proxy ....\n>\n> If you don't want to make it a global setting you can setup the\n> submodule configuration after running init but before running update\n> i.e.\n>\n>   $ git submodule init MySubmodule\n>   $ (cd MySubmodule && git config http.proxy ...)\n>   $ git submodule update MySubmodule\n\n For some reason, the init call does not create the submodule\ndirectory as you indicate. I also checked in .git/modules and it's not\nthere either.\n"},{"id":"255250","messageId":"CAHd499B+ZAAYAtDdsX=v4H60dq3wuVgR0Hk7x6NRubMJ_Umjjg@mail.gmail.com","threadId":"38439","inReplyTo":"CAHd499A+K=uh=wt4P_qy+8XOEttTziJEPvhE+=03oD_MRxna2Q@mail.gmail.com","subject":"Re: Git submodule first time update with proxy","fromName":"Robert Dailey","fromEmail":"rcdailey.lists@gmail.com","sentAt":"2015-01-24T04:45:40Z","receivedAt":"2015-01-24T04:45:40Z","isPatch":false,"sender":{"key":"rcdailey.lists@gmail.com","avatar":null},"body":"On Fri, Jan 23, 2015 at 10:23 PM, Robert Dailey\n<rcdailey.lists@gmail.com> wrote:\n> On Fri, Jan 23, 2015 at 4:13 PM, Chris Packham <judge.packham@gmail.com> wrote:\n>> Hi,\n>>\n>> On Fri, Jan 23, 2015 at 3:50 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>>> I have a submodule using HTTP URL. I do this:\n>>>\n>>> $ git submodule init MySubmodule\n>>> $ git submodule update MySubmodule\n>>>\n>>> The 2nd command fails because the HTTP URL cannot be resolved, this is\n>>> because it requires a proxy. I have \"http.proxy\" setup properly in the\n>>> .git/config of my parent git repository, so I was hoping the submodule\n>>> update function would have a way to specify it to inherit the proxy\n>>> value from the parent config.\n>>\n>> Your not the first to suggest it and you probably won't be the last.\n>> It is hard to decide _which_ config variables, if any, should\n>> propagate from the parent. What works for one use-case may not\n>> necessarily work for another.\n>>\n>>> How can I set up my submodule?\n>>\n>> Probably the easiest thing would be to make your http.proxy\n>> configuration global i.e.\n>>\n>>   $ git config --global http.proxy ....\n>>\n>> If you don't want to make it a global setting you can setup the\n>> submodule configuration after running init but before running update\n>> i.e.\n>>\n>>   $ git submodule init MySubmodule\n>>   $ (cd MySubmodule && git config http.proxy ...)\n>>   $ git submodule update MySubmodule\n>\n>  For some reason, the init call does not create the submodule\n> directory as you indicate. I also checked in .git/modules and it's not\n> there either.\n\nCorrection:\n\nI have to deinit the submodule then init again, then the submodule dir\nis created (but empty). When I run the git config command inside the\nsubmodule directory, it silently returns and does not indicate\nfailure, however the final git submodule update command shows failure\nto access the remote and then subsequently the submodule empty\ndirectory is removed by Git.\n"},{"id":"255252","messageId":"CAFOYHZBqLPzE94sbb=RoD0yViqPhJ+DRnYJQ6o_2taF1DhhHhA@mail.gmail.com","threadId":"38439","inReplyTo":"CAHd499B+ZAAYAtDdsX=v4H60dq3wuVgR0Hk7x6NRubMJ_Umjjg@mail.gmail.com","subject":"Re: Git submodule first time update with proxy","fromName":"Chris Packham","fromEmail":"judge.packham@gmail.com","sentAt":"2015-01-24T05:47:10Z","receivedAt":"2015-01-24T05:47:10Z","isPatch":false,"sender":{"key":"judge.packham@gmail.com","avatar":"https://avatars.githubusercontent.com/u/155667?v=4"},"body":"On Sat, Jan 24, 2015 at 5:45 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n> On Fri, Jan 23, 2015 at 10:23 PM, Robert Dailey\n> <rcdailey.lists@gmail.com> wrote:\n>> On Fri, Jan 23, 2015 at 4:13 PM, Chris Packham <judge.packham@gmail.com> wrote:\n>>> Hi,\n>>>\n>>> On Fri, Jan 23, 2015 at 3:50 PM, Robert Dailey <rcdailey.lists@gmail.com> wrote:\n>>>> I have a submodule using HTTP URL. I do this:\n>>>>\n>>>> $ git submodule init MySubmodule\n>>>> $ git submodule update MySubmodule\n>>>>\n>>>> The 2nd command fails because the HTTP URL cannot be resolved, this is\n>>>> because it requires a proxy. I have \"http.proxy\" setup properly in the\n>>>> .git/config of my parent git repository, so I was hoping the submodule\n>>>> update function would have a way to specify it to inherit the proxy\n>>>> value from the parent config.\n>>>\n>>> Your not the first to suggest it and you probably won't be the last.\n>>> It is hard to decide _which_ config variables, if any, should\n>>> propagate from the parent. What works for one use-case may not\n>>> necessarily work for another.\n>>>\n>>>> How can I set up my submodule?\n>>>\n>>> Probably the easiest thing would be to make your http.proxy\n>>> configuration global i.e.\n>>>\n>>>   $ git config --global http.proxy ....\n>>>\n>>> If you don't want to make it a global setting you can setup the\n>>> submodule configuration after running init but before running update\n>>> i.e.\n>>>\n>>>   $ git submodule init MySubmodule\n>>>   $ (cd MySubmodule && git config http.proxy ...)\n>>>   $ git submodule update MySubmodule\n>>\n>>  For some reason, the init call does not create the submodule\n>> directory as you indicate. I also checked in .git/modules and it's not\n>> there either.\n>\n\nOK I must be wrong about that. I was working from memory. Trying it\nnow I see the error in my thinking\n\n  $ git submodule init bar\n  Submodule 'bar' (bar.git) registered for path 'bar'\n\nI thought this meant that bar/.git (and .git/modules/bar) had been\ncreated but as you point out I was wrong.\n\n> Correction:\n>\n> I have to deinit the submodule then init again, then the submodule dir\n> is created (but empty).\n\nThat's the default state of an uninitialized submodule.\n\n> When I run the git config command inside the\n> submodule directory, it silently returns and does not indicate\n> failure, however the final git submodule update command shows failure\n> to access the remote and then subsequently the submodule empty\n> directory is removed by Git.\n\nSo it looks like the only solution to your problem right now is to use\ngit config --global for your proxy configuration.\n"}]}