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

Re: Using different protocols for "pull" and "push".

From
Mike Gaffney <mr.gaffo@gmail.com>
Date
Jun 5, 2009, 15:03 UTC
Message-ID
<4A2933B4.1060209@gmail.com>
In-Reply-To
<h09kk8$rb4$1@ger.gmane.org>

I typically set up a "push" remote when I need to do things like this. I've got a few projects where I get confused of which one is origin so I protect myself from pushing accidentally (I have to think for a second when pushing).

-Mike
Nikos Chantziaras wrote:
Show 18 quoted lines
> Hi.
>
> I wonder if it's possible to setup Git (probably in .git/config) to 
> use SSH only for "git push" and use the git protocol for "git pull".  
> My current configuration is:
>
> [remote "origin"]
>         url = ssh://user@project.someserver.net/gitroot/project
>         fetch = +refs/heads/*:refs/remotes/origin/*
>
> Issuing a "git pull" command results in pulling using SSH (along with 
> asking for a password).  Is there a way to alter the configuration so 
> that a "pull" will use git:// instead of ssh:// ?
>
> -- 
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous: Michael J Gruber
Message 8 of 8 in “Using different protocols for "pull" and "push".”
  1. Nikos ChantziarasJun 4, 2009
  2. Junio C HamanoJun 5, 2009
  3. [WIP/RFC] Allow push and fetch urls to be differentMichael J Gruber, Jun 6, 2009
  4. Tay Ray ChuanJun 6, 2009
  5. Linus TorvaldsJun 6, 2009
  6. Junio C HamanoJun 7, 2009
  7. Michael J GruberJun 7, 2009
  8. Mike GaffneyJun 5, 2009

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.