Subject: git clone on Mac OS X issues
Hey, my hard drive crashed and I used a TIme Machine backup to restore.
when i did though, some things had stopped working.
I reinstalled Xcode, Macports, and reinstalled Git through Macports.
i've verified that my PATH is correct and following an article i found online, i've symbolically linked my .bashrc, and .profile to my .bash_login file, which is where I have my correct path.
Still though whenever i try to clone from github I get the following:
git clone git://github.com/rubyist/aasm.git aasm
Initialized empty Git repository in /Users/gsaravia/aasm/.git/
ERROR: What?
fatal: The remote end hung up unexpectedly
Another wierd thing is that can clone over ssh from a friend's computer, so I really do not understand this error.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Tekkub on 28 Oct, 2009 03:12 AM
What?
Man that's priceless... If you can clone over ssh, can you clone a git@github.com URL without issue? Have you tried any other git://github.com URLs?
3 Posted by Gabe Saravia on 29 Oct, 2009 03:59 AM
hey, thanks for the quick reply!
I know crazy error message, right? I think i said "what?" when i saw that that was the error
cloning from a git@github.com link also does indeed work, which i was a little surprised at.
However, I have tried other git://github.com url's (scriptaculous, restful_authentication) and they also do not work.
so... what does that mean?
Support Staff 4 Posted by Tekkub on 29 Oct, 2009 04:04 AM
Tom says that it means that the server didn't understand your client's request... and that it should never ever happen. My first thought would be to try to precompiled git installer instead of macports: http://code.google.com/p/git-osx-installer/ That's what I use, and I've never hit any issues. Back when Snow Leopard came out I used my Time Machine backup to transfer my system from my mini to a MBP and never hit any issues. I, of course, had to install xcode after the switch to Snow Leopard.
5 Posted by Gabe Saravia on 29 Oct, 2009 04:04 AM
Hey, i tried to post a reply directly on the site but i don't think that
worked.
anyway, thank you for the quick reply!
I can clone from a git@github URL, and i can still not clone from other
git://github.com url's.
So...what does that tell you?
and yeah, isn't that "What?" error ridicilous??
thanks for your help,
-Gabe
On Tue, Oct 27, 2009 at 10:12 PM, Tekkub <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
Support Staff 6 Posted by Tekkub on 29 Oct, 2009 04:07 AM
Your reply came though, sometimes it takes Tender a little time to run things through the spam filter.
7 Posted by Gabe Saravia on 29 Oct, 2009 04:09 AM
ok, i actually tried that installer first before i tried macports and I got
the same error, that's when i deleted that install and used macports.
On Wed, Oct 28, 2009 at 11:05 PM, Tekkub <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
8 Posted by Gabe Saravia on 29 Oct, 2009 04:10 AM
thanks, good to know.
On Wed, Oct 28, 2009 at 11:07 PM, Tekkub <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
Support Staff 9 Posted by Tekkub on 29 Oct, 2009 04:10 AM
Hrm... then maybe the issues isn't git, but ssh. I'm going to forward this on to Tom, he might have a better idea how to troubleshoot this.
10 Posted by Gabe Saravia on 29 Oct, 2009 04:12 AM
ok, thanks again!
On Wed, Oct 28, 2009 at 11:10 PM, Tekkub <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
Support Staff 11 Posted by Tom Preston-Werner on 29 Oct, 2009 05:42 AM
Can you try your clone again? I've made our script return a more helpful error that should shed some light on the situation.
12 Posted by Gabe Saravia on 29 Oct, 2009 12:37 PM
you know, this is going to show my ignorance, but until this email, i didn't
even realize that the "What?" error was coming from github and not from git
itself. How cool is it that you went in and changed the error messages??
git clone git://github.com/madrobby/scriptaculous.git scriptaculous
Initialized empty Git repository in /Users/gsaravia/scriptaculous/.git/
ERROR: Invalid command: 9418
fatal: The remote end hung up unexpectedly
git clone git://github.com/rubyist/aasm.git aasm
Initialized empty Git repository in /Users/gsaravia/aasm/.git/
ERROR: Invalid command: 9418
fatal: The remote end hung up unexpectedly
git clone git@github.com:gsaravia/Has-In-Model-Attributes.git clone_try
Initialized empty Git repository in /Users/gsaravia/clone_try/.git/
remote: Counting objects: 209, done.
remote: Compressing objects: 100% (172/172), done.
remote: Total 209 (delta 56), reused 126 (delta 15)
Receiving objects: 100% (209/209), 121.73 KiB, done.
Resolving deltas: 100% (56/56), done.
On Thu, Oct 29, 2009 at 12:42 AM, Tom Preston-Werner <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
Support Staff 13 Posted by Tom Preston-Werner on 29 Oct, 2009 05:52 PM
I'm not sure how, but your client is trying to connect via SSH even when you do a clone over a git:// address (which uses port 9418). I know this because the error is coming from our script that serves SSH connections.
I've never seen this before and it's quite strange. Did you set any configuration settings that might be affecting this somehow?
14 Posted by Gabe Saravia on 29 Oct, 2009 06:20 PM
Certainly not to my knowledge. It's been a while since i've set any git or
ssh config settings. Where should I look/what should i be looking for?
On Thu, Oct 29, 2009 at 12:54 PM, Tom Preston-Werner <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
Support Staff 15 Posted by Tekkub on 29 Oct, 2009 07:21 PM
Could you paste your ~/.gitconfig file, and /etc/gitconfig if it exists? Also check if the GIT_PROXY_COMMAND env variable is set:
echo $GIT_PROXY_COMMAND16 Posted by Gabe Saravia on 29 Oct, 2009 07:36 PM
That was it.
When I looked in my .gitconfig file:
[user]
name = Gabriel Saravia
email = gabe.saravia@gmail.com
[github]
user = gsaravia
token = [deleted by me]
[core]
gitProxy = "ssh"
editor = "mate -w"
Figuring you would tell me to delete the gitProxy line, I did so and now
everything works.
my only question is - does this make git less secure?
-Gabe
On Thu, Oct 29, 2009 at 2:21 PM, Tekkub <
tender+df983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com<tender%2Bdf983340c17f0e9befe5f8d2a2818fe3d5e35a851@tenderapp.com>
> wrote:
Support Staff 17 Posted by Tekkub on 29 Oct, 2009 07:46 PM
gitProxy is only used for
git://URLs, which are public and don't use auth in the first place. Pushing and all transactions for private repos are done over ssh already, those are thegit@github.com:...URLs.