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

Re: git push refspec problem

From
Johannes Gilger <heipei@hackvalue.de>
Date
Nov 7, 2007, 15:22 UTC
Message-ID
<4731D852.2080500@hackvalue.de>
In-Reply-To
<Pine.LNX.4.64.0711071510480.4362@racer.site>
Johannes Schindelin wrote:
Show 11 quoted lines
> Hi,
> 
> On Wed, 7 Nov 2007, James wrote:
> 
>>        fetch = +refs/heads/*:refs/remotes/origin/*
> 
> This is a refspec.
> 
>>        push = ssh://james@my.server.com/home/james/scm/git/project.git/
> 
> This is a URL.  It does not specify any refs.  But "push =" expects a URL.

I think Johannes meant to say "But 'push =' expects a refspec." (the manpage even says so).

About your problem: If you want to pull from a git:// repository and push to another with ssh:// (or in general when having two different repositories for pushing and fetching) in my novice understanding you would need two remotes. In your case, can't you just use your ssh-url for fetching as well?

Regards, Jojo

-- 
Johannes Gilger <heipei@hackvalue.de>
http://hackvalue.de/heipei/
GPG-Key: 0x42F6DE81
GPG-Fingerprint: BB49 F967 775E BB52 3A81  882C 58EE B178 42F6 DE81
Previous: Pierre HabouzitNext: James
Message 7 of 10 in “git push refspec problem”
  1. JamesNov 7, 2007
  2. Johannes SchindelinNov 7, 2007
  3. Pierre HabouzitNov 7, 2007
  4. JamesNov 7, 2007
  5. Johannes GilgerNov 7, 2007
  6. Pierre HabouzitNov 7, 2007
  7. Johannes GilgerNov 7, 2007
  8. JamesNov 7, 2007
  9. Daniel BarkalowNov 7, 2007
  10. Johannes SchindelinNov 7, 2007

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.