{"thread":{"id":"3715","subject":"git push refspec URL weirdness","startedAt":"2006-03-25T03:42:47Z","lastAt":"2006-03-25T06:22:05Z","messageCount":2,"participants":["Jon Loeliger","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"17902","messageId":"E1FMzfr-0006xT-Uq@jdl.com","threadId":"3715","inReplyTo":null,"subject":"git push refspec URL weirdness","fromName":"Jon Loeliger","fromEmail":"jdl@jdl.com","sentAt":"2006-03-25T03:42:47Z","receivedAt":"2006-03-25T03:42:47Z","isPatch":false,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"\nI wanted to git push some bits to a remote repo\nand set up this .git/refs/remotes/publish file:\n\n    URL: git+ssh://www.example.com/some/path/repo.git\n    Push: my-branch:public-branch\n\nSo that I could \"git push publish\".\n\nThe ssh on the far side is listening on port 1234\nand not the default 22.  So I slapped this into my\n~/.ssh/config file on the local machine:\n\n    Host www.example.com\n    Port 1234\n\nThis worked great for a straight \"ssh www.example.com\"\nconnection.  However, git still complained that port 22\nwas refusing connections.  It was.  Git shouldn't have\nbeen trying to use it.\n\nSo Junio suggested taking advantage of the fact that the\ndefault refspec uses git+ssh and use this instead:\n\n    URL: www.example.com:/pub/software/linux-2.6-86xx.git\n    Push: my-branch:public-branch\n\nWhich just worked.\n\nSo this is either a bug report or google food. :-)\n\njdl\n"},{"id":"17909","messageId":"7vslp7xcvm.fsf@assigned-by-dhcp.cox.net","threadId":"3715","inReplyTo":"E1FMzfr-0006xT-Uq@jdl.com","subject":"Re: git push refspec URL weirdness","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-03-25T06:22:05Z","receivedAt":"2006-03-25T06:22:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jon Loeliger <jdl@jdl.com> writes:\n\n> So Junio suggested taking advantage of the fact that the\n> default refspec uses git+ssh and use this instead:\n>\n>     URL: www.example.com:/pub/software/linux-2.6-86xx.git\n>     Push: my-branch:public-branch\n>\n> Which just worked.\n>\n> So this is either a bug report or google food. :-)\n\nActually, I did not suggest it as a workaround (I've never used\ngit+ssh:// URL myself -- I'm old fashioned -- and always used\nhost:path syntax).  If git+ssh:// insists on the fixed port, it\nsurely is broken, but I do not see how it would make a\ndifference.  In either case, connect.c::git_connect() goes\nPROTO_SSH codepath which never opens a tcp connection itself --\nit just calls the same \"ssh\" command.\n"}]}