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

Re: Proxy Flag for git-clone, push, pull

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Oct 17, 2023, 05:19 UTC
Message-ID
<CAPig+cR8-s3bGCw6qF12Bcxuy4vB8Gh9H5jTb_r3pUu1LK35-g@mail.gmail.com>
In-Reply-To
<CACaPSotRhyFZ-eBZ9KNKRUjLFHKo09P-Un+sitDXEktzmwuaxA@mail.gmail.com>
On Tue, Oct 17, 2023 at 1:15 AM Jaydeep Das <jaydeepjd.8914@gmail.com> wrote:
Show 8 quoted lines
> To make git work through proxy, we need to set the `http.proxy` config
> or need to set `http_proxy` environment variable.
>
> However wouldn't it be better if there was a flag in the command
> itself (like npm) which
> overrides whatever proxy is set. Something like
>
> git clone --proxy "http://..." <url>
The -c option allows you to specify configuration on the command-line, so:
    git -c http.proxy="http://..." clone <url>
should do what you want.
Previous: Jaydeep Das
Message 2 of 2 in “Proxy Flag for git-clone, push, pull”
  1. Jaydeep DasOct 17, 2023
  2. Eric SunshineOct 17, 2023

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.