# Where does the variable GIT_HOSTING comes?

4 messages from 2021-06-23 to 2021-06-24. Participants: Hongyi Zhao, Jeff King.
Thread: https://gitlist.dev/t/55997

## Hongyi Zhao, 2021-06-23 23:30

Subject: Where does the variable GIT_HOSTING comes?
Message-ID: <CAGP6PO+hnvAdYuMKQG15-fhRVdDBCCn2xfnLP5=exPcs4GHJVQ@mail.gmail.com>
URL: https://gitlist.dev/e/CAGP6PO%2BhnvAdYuMKQG15-fhRVdDBCCn2xfnLP5%3DexPcs4GHJVQ%40mail.gmail.com

```
Hi all,

On Ubuntu 20.04, see my following relevant git variables settings:

$ env |grep GIT
GIT_SSL_NO_VERIFY=1
GIT_HOSTING=git@git.domain.com
GIT_DISCOVERY_ACROSS_FILESYSTEM=true

I don't set the `GIT_HOSTING' variable at all. Then where does it come
from and what's the function of it?

Regards
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China

```

## Jeff King, 2021-06-24 00:19

Subject: Re: Where does the variable GIT_HOSTING comes?
Message-ID: <YNPPkQrK8PtPAr8C@coredump.intra.peff.net>
URL: https://gitlist.dev/e/YNPPkQrK8PtPAr8C%40coredump.intra.peff.net
In-Reply-To: <CAGP6PO+hnvAdYuMKQG15-fhRVdDBCCn2xfnLP5=exPcs4GHJVQ@mail.gmail.com>

```
On Thu, Jun 24, 2021 at 07:30:29AM +0800, Hongyi Zhao wrote:

> On Ubuntu 20.04, see my following relevant git variables settings:
> 
> $ env |grep GIT
> GIT_SSL_NO_VERIFY=1
> GIT_HOSTING=git@git.domain.com
> GIT_DISCOVERY_ACROSS_FILESYSTEM=true
> 
> I don't set the `GIT_HOSTING' variable at all. Then where does it come
> from and what's the function of it?

This variable is neither set by nor respected by Git. It may be set by a
system file, or perhaps a snippet you copied into your user setup at
some point. Try:

  grep GIT_HOSTING ~/.bash* /etc/bash*

(that's not an exhaustive list of places the environment may get set up,
but it contains the likely ones).

-Peff

```

## Jeff King, 2021-06-24 00:23

Subject: Re: Where does the variable GIT_HOSTING comes?
Message-ID: <YNPQcAnIh8APLFxk@coredump.intra.peff.net>
URL: https://gitlist.dev/e/YNPQcAnIh8APLFxk%40coredump.intra.peff.net
In-Reply-To: <YNPPkQrK8PtPAr8C@coredump.intra.peff.net>

```
On Wed, Jun 23, 2021 at 08:19:30PM -0400, Jeff King wrote:

> On Thu, Jun 24, 2021 at 07:30:29AM +0800, Hongyi Zhao wrote:
> 
> > On Ubuntu 20.04, see my following relevant git variables settings:
> > 
> > $ env |grep GIT
> > GIT_SSL_NO_VERIFY=1
> > GIT_HOSTING=git@git.domain.com
> > GIT_DISCOVERY_ACROSS_FILESYSTEM=true
> > 
> > I don't set the `GIT_HOSTING' variable at all. Then where does it come
> > from and what's the function of it?
> 
> This variable is neither set by nor respected by Git. It may be set by a
> system file, or perhaps a snippet you copied into your user setup at
> some point. Try:
> 
>   grep GIT_HOSTING ~/.bash* /etc/bash*
> 
> (that's not an exhaustive list of places the environment may get set up,
> but it contains the likely ones).

Looks like you might have "bash-it" set up:

  https://github.com/Bash-it/bash-it/search?q=GIT_HOSTING

-Peff

```

## Hongyi Zhao, 2021-06-24 00:26

Subject: Re: Where does the variable GIT_HOSTING comes?
Message-ID: <CAGP6POL6EOMgKWZUneHoveJnX3dn7YjF4303+RGo6Lkm17-5mw@mail.gmail.com>
URL: https://gitlist.dev/e/CAGP6POL6EOMgKWZUneHoveJnX3dn7YjF4303%2BRGo6Lkm17-5mw%40mail.gmail.com
In-Reply-To: <YNPQcAnIh8APLFxk@coredump.intra.peff.net>

```
On Thu, Jun 24, 2021 at 8:23 AM Jeff King <peff@peff.net> wrote:
>
> On Wed, Jun 23, 2021 at 08:19:30PM -0400, Jeff King wrote:
>
> > On Thu, Jun 24, 2021 at 07:30:29AM +0800, Hongyi Zhao wrote:
> >
> > > On Ubuntu 20.04, see my following relevant git variables settings:
> > >
> > > $ env |grep GIT
> > > GIT_SSL_NO_VERIFY=1
> > > GIT_HOSTING=git@git.domain.com
> > > GIT_DISCOVERY_ACROSS_FILESYSTEM=true
> > >
> > > I don't set the `GIT_HOSTING' variable at all. Then where does it come
> > > from and what's the function of it?
> >
> > This variable is neither set by nor respected by Git. It may be set by a
> > system file, or perhaps a snippet you copied into your user setup at
> > some point. Try:
> >
> >   grep GIT_HOSTING ~/.bash* /etc/bash*
> >
> > (that's not an exhaustive list of places the environment may get set up,
> > but it contains the likely ones).
>
> Looks like you might have "bash-it" set up:
>
>   https://github.com/Bash-it/bash-it/search?q=GIT_HOSTING

Exactly. I forgot this. You're absolutely right, see below for more
detailed info:

$ grep -B1 GIT_HOSTING ~/.bash* /etc/bash*
/home/werner/.bashrc-  # Your place for hosting Git repos. I use this
for private repos.
/home/werner/.bashrc:  export GIT_HOSTING='git@git.domain.com'

HY
-- 
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
NO. 552 North Gangtie Road, Xingtai, China

```
