I have found the best solution for repo's on github and bitbucket is to create an SSH key-pair with no password.
$ cd .ssh
$ ssh-keygen -t rsa -b 2048 -f github_id_rsa
$ vi config
Then add the following:
Host github
HostName github.com
User git
IdentityFile ~/.ssh/github_id_rsa
And to then refer to the repo as:
ssh://github/trojanfoe/myrepo
^^^^^^
(note that's the name of the config "alias", not github.com)
This works well in Xcode, however I see "green lights" next to the repo during a pull, but "red lights" next to the repo during a push (this might be a bug in Xcode 5.1 beta), but it works without complaint and without the need for a password, which is great if you use Jenkins to do your release builds.
The Repositories under Preferences > Accounts cannot connect using the ssh alias either, but strangely they function just fine when performing Source Control operations:
