# push instead of

5 messages from 2010-04-30 to 2010-04-30. Participants: Mahesh Vaidya, Tomas Carnecky, Jay Soffian.
Thread: https://gitlist.dev/t/23635

## Mahesh Vaidya, 2010-04-30 09:56

Subject: push instead of
Message-ID: <z2gb42431c81004300256ke7248f40y7bce060d52cfa943@mail.gmail.com>
URL: https://gitlist.dev/e/z2gb42431c81004300256ke7248f40y7bce060d52cfa943%40mail.gmail.com

```
I am facing problem at pushInsteadIOf. I would like pull from
"pullhost" and push to "pushhost" as my pullhost as pre-receive
trigger which not accepting pushes.

However when I do git push it still hits pull host. I have following config.

[remote "origin"]
        fetch = +refs/heads/*:refs/remotes/origin/*
        url = gitosis@pull_host:repos.git
[url "gitosis@localhost"]
        pushInsteadOf = gitosis@PUSH_host:repos.git


-- 
Thank you and best regards.
Mahesh Vaidya  / 9740500144
http://www.twitter.com/forvaidya

```

## Tomas Carnecky, 2010-04-30 17:24

Subject: Re: push instead of
Message-ID: <4BDB1231.9090600@dbservice.com>
URL: https://gitlist.dev/e/4BDB1231.9090600%40dbservice.com
In-Reply-To: <z2gb42431c81004300256ke7248f40y7bce060d52cfa943@mail.gmail.com>

```
On 4/30/10 11:56 AM, Mahesh Vaidya wrote:
> I am facing problem at pushInsteadIOf. I would like pull from
> "pullhost" and push to "pushhost" as my pullhost as pre-receive
> trigger which not accepting pushes.
>
> However when I do git push it still hits pull host. I have following config.
>
> [remote "origin"]
>          fetch = +refs/heads/*:refs/remotes/origin/*
>          url = gitosis@pull_host:repos.git
	pushurl = gitosis@PUSH_host:repos.git

tom

```

## Mahesh Vaidya, 2010-04-30 18:24

Subject: Re: push instead of
Message-ID: <p2nb42431c81004301124l6744553csbe5abdeda0d48e67@mail.gmail.com>
URL: https://gitlist.dev/e/p2nb42431c81004301124l6744553csbe5abdeda0d48e67%40mail.gmail.com
In-Reply-To: <4BDB1231.9090600@dbservice.com>

```
No Luck, it still hits  readonly url ;


On Fri, Apr 30, 2010 at 10:54 PM, Tomas Carnecky <tom@dbservice.com> wrote:
> On 4/30/10 11:56 AM, Mahesh Vaidya wrote:
>>
>> I am facing problem at pushInsteadIOf. I would like pull from
>> "pullhost" and push to "pushhost" as my pullhost as pre-receive
>> trigger which not accepting pushes.
>>
>> However when I do git push it still hits pull host. I have following
>> config.
>>
>> [remote "origin"]
>>         fetch = +refs/heads/*:refs/remotes/origin/*
>>         url = gitosis@pull_host:repos.git
>
>        pushurl = gitosis@PUSH_host:repos.git
>
> tom
>
>



-- 
Thank you and best regards.
Mahesh Vaidya  / 9740500144
http://www.twitter.com/forvaidya

```

## Tomas Carnecky, 2010-04-30 22:11

Subject: Re: push instead of
Message-ID: <4BDB55A4.7000801@dbservice.com>
URL: https://gitlist.dev/e/4BDB55A4.7000801%40dbservice.com
In-Reply-To: <p2nb42431c81004301124l6744553csbe5abdeda0d48e67@mail.gmail.com>

```
On 4/30/10 8:24 PM, Mahesh Vaidya wrote:
> No Luck, it still hits  readonly url ;

Maybe your git version is too old. pushurl was introduced in v1.6.4

>
> On Fri, Apr 30, 2010 at 10:54 PM, Tomas Carnecky<tom@dbservice.com>  wrote:
>> On 4/30/10 11:56 AM, Mahesh Vaidya wrote:
>>>
>>> I am facing problem at pushInsteadIOf. I would like pull from
>>> "pullhost" and push to "pushhost" as my pullhost as pre-receive
>>> trigger which not accepting pushes.
>>>
>>> However when I do git push it still hits pull host. I have following
>>> config.
>>>
>>> [remote "origin"]
>>>          fetch = +refs/heads/*:refs/remotes/origin/*
>>>          url = gitosis@pull_host:repos.git
>>
>>         pushurl = gitosis@PUSH_host:repos.git

```

## Jay Soffian, 2010-04-30 23:59

Subject: Re: push instead of
Message-ID: <m2g76718491004301659n7665d221se131a7a194530e32@mail.gmail.com>
URL: https://gitlist.dev/e/m2g76718491004301659n7665d221se131a7a194530e32%40mail.gmail.com
In-Reply-To: <z2gb42431c81004300256ke7248f40y7bce060d52cfa943@mail.gmail.com>

```
On Fri, Apr 30, 2010 at 5:56 AM, Mahesh Vaidya <forvaidya@gmail.com> wrote:
> I am facing problem at pushInsteadIOf. I would like pull from
> "pullhost" and push to "pushhost" as my pullhost as pre-receive
> trigger which not accepting pushes.
>
> However when I do git push it still hits pull host. I have following config.
>
> [remote "origin"]
>        fetch = +refs/heads/*:refs/remotes/origin/*
>        url = gitosis@pull_host:repos.git
> [url "gitosis@localhost"]
>        pushInsteadOf = gitosis@PUSH_host:repos.git

I think you have your arguments backwards if I understand your mail
correctly. Try:

[url "gitosis@PUSH_host:repos.git"]
       pushInsteadOf = gitosis@pull_host:repos.git

Now when pushing, _instead_ of pushing to
"gitosis@pull_host:repos.git" (which is the origin url), you will push
to "gitosis@PUSH_host:repos.git".

I'm not sure what gitosis@localhost was supposed to represent in your email.

j.

```
