Re: Git Config pushInsteadOf is not working
From: Phil Hord <hidden>
Date: 2016-06-15 23:00:19
I thought you had the URLs backwards, but that doesn't seem to be the problem, assuming I am reading your transcription correctly. Maybe the 'insteadOf' is being applied in addition to (and cancelling out) the pushInsteadOf. Does it work as expected if you remove one or the other? In any case, it sounds like a Git issue, not a Gerrit one. You should ask on git@vger.kernel.org, which I have cc'ed here. Phil On Tue, Mar 11, 2014 at 4:44 AM, Raf [off-list ref] wrote:
Hi All,
I have been searching high and low for this issue, but somehow I do not see
anyone encountering the same issue as me.
Here is the scenario:
I have created a local mirror for my group of developers to download the
AOSP code from an external gerrit server.
So the developers will download the code from the mirror but push to the
external gerrit server.
Hence, I have edited my /home/user/.gitconfig file to add the following:
#To download from
[url "ssh://localMirror"]
insteadOf=ssh://gerritServer
#to push
[url "ssh://gerritServer"]
pushInsteadOf = ssh://localMirror
Some how, the pushInsteadOf does not work, when i tried to push the changes
to the external gerrit server, it still pushes to the local mirror server.
Also, when I tried to manually add the remote to the repository: git remote
add gerrit_origin ssh://gerritServer
I tried to push to the gerrit_origin, it still pushes to the local mirror
server. Which is strange..
Please help. I have spent whole day looking for this solution to no avail.
Thanks.--