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

git push refspec URL weirdness

From
Jon Loeliger <jdl@jdl.com>
Date
Mar 25, 2006, 03:42 UTC
Message-ID
<E1FMzfr-0006xT-Uq@jdl.com>

I wanted to git push some bits to a remote repo and set up this .git/refs/remotes/publish file:

    URL: git+ssh://www.example.com/some/path/repo.git
    Push: my-branch:public-branch
So that I could "git push publish".

The ssh on the far side is listening on port 1234 and not the default 22. So I slapped this into my ~/.ssh/config file on the local machine:

    Host www.example.com
    Port 1234

This worked great for a straight "ssh www.example.com" connection. However, git still complained that port 22 was refusing connections. It was. Git shouldn't have been trying to use it.

So Junio suggested taking advantage of the fact that the default refspec uses git+ssh and use this instead:

    URL: www.example.com:/pub/software/linux-2.6-86xx.git
    Push: my-branch:public-branch
Which just worked.
So this is either a bug report or google food. :-)
jdl
Next: Junio C Hamano
Message 1 of 2 in “git push refspec URL weirdness”
  1. Jon LoeligerMar 25, 2006
  2. Junio C HamanoMar 25, 2006

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.