# Setting http proxy and http password

3 messages from 2010-11-22 to 2010-11-22. Participants: Christoph Bartoschek, Matthieu Moy.
Thread: https://gitlist.dev/t/25812

## Christoph Bartoschek, 2010-11-22 22:39

Subject: Setting http proxy and http password
Message-ID: <o28rr7-5r4.ln1@homer.bruehl.pontohonk.de>
URL: https://gitlist.dev/e/o28rr7-5r4.ln1%40homer.bruehl.pontohonk.de

```
Hi,

I have two questions on the git http backend.

1. How can I set the proxy that should be used for git commands? For 
externals pages I have a proxy. But for our git server no proxy should be 
used. How can I configure git to never use the proxy?

2. How can I have git remember the username and password for our git server?

Christoph

```

## Matthieu Moy, 2010-11-22 22:50

Subject: Re: Setting http proxy and http password
Message-ID: <vpqeiadc6sb.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqeiadc6sb.fsf%40bauges.imag.fr
In-Reply-To: <o28rr7-5r4.ln1@homer.bruehl.pontohonk.de>

```
Christoph Bartoschek <bartoschek@gmx.de> writes:

> 1. How can I set the proxy that should be used for git commands? For 
> externals pages I have a proxy. But for our git server no proxy should be 
> used. How can I configure git to never use the proxy?

Search for proxy here:

http://www.kernel.org/pub/software/scm/git/docs/git-config.html

but I think the more or less standard $http_proxy environment variable
does the trick.

> 2. How can I have git remember the username and password for our git server?

Either use ~/.netrc (see
http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-over-http.txt ),
or set the URL of the remote repo to
http(s)://user:password@server.com/path in .git/config (after
restricting read permissions on this file appropriately, of course).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

```

## Christoph Bartoschek, 2010-11-22 23:32

Subject: Re: Setting http proxy and http password
Message-ID: <p4brr7-t56.ln1@homer.bruehl.pontohonk.de>
URL: https://gitlist.dev/e/p4brr7-t56.ln1%40homer.bruehl.pontohonk.de
In-Reply-To: <vpqeiadc6sb.fsf@bauges.imag.fr>

```
Matthieu Moy wrote:

> Christoph Bartoschek <bartoschek@gmx.de> writes:
> 
>> 1. How can I set the proxy that should be used for git commands? For
>> externals pages I have a proxy. But for our git server no proxy should be
>> used. How can I configure git to never use the proxy?
> 
> Search for proxy here:
> 
> http://www.kernel.org/pub/software/scm/git/docs/git-config.html
> 
> but I think the more or less standard $http_proxy environment variable
> does the trick.
> 
>> 2. How can I have git remember the username and password for our git
>> server?
> 
> Either use ~/.netrc (see
> http://www.kernel.org/pub/software/scm/git/docs/howto/setup-git-server-
over-http.txt
> ), or set the URL of the remote repo to
> http(s)://user:password@server.com/path in .git/config (after
> restricting read permissions on this file appropriately, of course).
> 

Thanks for the reply. 

For the first problem I now use the environment variable no_proxy. Adding 
http_proxy="" in front of each git command that communicates with the depot 
is a little bit tedious.

For the second problem I now use the .netrc file.

Christoph

```
