Besides all the iOS 4.0 hype and the fantastic new iPhone, what really made my day is the forthcoming new version of Apple’s IDE: Xcode 4.
After all, WWDC is a Developer Conference. Innovating the essentials tools we all work with daily, is as big a part of what we should have come to expect, as new SDKs and updated operating systems. Unfortunately, I cannot post any details about Xcode 4, nor any screenshots, as the current preview is still under NDA.
A key feature, that has been leaked elsewhere, is Git (and GitHub) support. I heavily use Git as a Source Code Management solution, both in my company and for my private projects.
I was literally blown away by the level of support for Git, that Apple demoed during WWDC.
No wonder, that huge disappointment hit me, when I tried to clone my first Git repo with the Xcode 4 Developer Preview and did not find the “Git” repository type in the UI. The only type offered was Subversion.
Turns out, there’s a simple solution: Xcode 4 expects the git command line tool to be available in /usr/bin. A quick which git on my console revealed, that my git binary instead resided in /usr/local/git/bin/git.
After creating a symlink in /usr/bin pointing to /usr/local/git/bin/git and restarting Xcode 4, everythink worked perfect!
The full command: sudo ln -s /usr/local/git/bin/git /usr/bin/git
A couple of observations: Connecting to GitHub did not work via the native git protocol, so I had to paste in the https URI to the repo. Same with ssh key based authentication, which did not work. I had to use my GitHub registered email address (username did not work) and password.
Besides this, working with a GitHub hosted git repository from within Xcode 4 just got really fantastic!

I just downloaded the XCode 4 preview 2 and tried to clone a repository but it does not work. Does your method still work? I get a “fatal: HTTP request failed”, when I try to clone the repo.
I tried these URLS:
https://username@github.com/username/repo_name.git
https://github.com/username/repo_name.git
and as a login I tried my email and my username.
Any ideas?
Try…
https://username@github.com/username/repo-name.git
email
password
the username didn’t work for me either, as he mentioned in his article.