git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Proxy Flag for git-clone, push, pull
@ 2023-10-17  5:15 Jaydeep Das
  2023-10-17  5:19 ` Eric Sunshine
  0 siblings, 1 reply; 2+ messages in thread
From: Jaydeep Das @ 2023-10-17  5:15 UTC (permalink / raw)
  To: Git Mailing List

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>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Proxy Flag for git-clone, push, pull
  2023-10-17  5:15 Proxy Flag for git-clone, push, pull Jaydeep Das
@ 2023-10-17  5:19 ` Eric Sunshine
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Sunshine @ 2023-10-17  5:19 UTC (permalink / raw)
  To: Jaydeep Das; +Cc: Git Mailing List

On Tue, Oct 17, 2023 at 1:15 AM Jaydeep Das <jaydeepjd.8914@gmail.com> wrote:
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-10-17  5:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-17  5:15 Proxy Flag for git-clone, push, pull Jaydeep Das
2023-10-17  5:19 ` Eric Sunshine

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).