git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Different Fetch and Push URLs?

From
Tomas Carnecky <tom@dbservice.com>
Date
Feb 26, 2010, 15:18 UTC
Message-ID
<4B87E660.7010401@dbservice.com>
In-Reply-To
<c115fd3c1002260701u11cf506fq747d7217d31eba59@mail.gmail.com>
On 2/26/10 4:01 PM, Tim Visher wrote:
Show 13 quoted lines
> Hello Everyone,
>
> My work situation leaves me in a situation where I can clone from my
> central repo but I can't push there.  Is it possible and does it make
> any sense to have a single remote with one URL that I pull from and
> another than I push to?  I only ask because I was looking at the
> output of `git remote show` and noticed that there are 2 URLs.  If it
> is possible, how do I do it?  I looked in `.git/config` and there's
> only 1 URL there.
>
> I am aware that I could have 2 remotes and simply consciously remember
> to only push to the one that I have access to.  This is what I usually
> do but the scenario I describe above seems nicer to me.
git config remote.origin.pushurl <your push url>
(see the git-config(1) man page for more details)
tom
Previous: Tim VisherNext: Jeff King
Message 2 of 4 in “Different Fetch and Push URLs?”
  1. Tim VisherFeb 26, 2010
  2. Tomas CarneckyFeb 26, 2010
  3. Jeff KingFeb 26, 2010
  4. Tim VisherFeb 26, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.