I'm following the git basics guide at http://git-scm.com/book/en/Git-Basics-Getting-a-Git-Repository, and after having had my initial question answered at Can't clone repo using git clone git://... - ok with git clone http:// regarding how to use the git URL to clone a repo, I'm now wondering what the difference is between what the book says:
git clone git://github.com/org_name/repo_name.git
and
git clone [email protected]:org_name/repo_name.git
the latter works for me, the line from the book doesn't and gives me error message
Cloning into 'repo_name' fatal: unable to connect to github.com: github.com: Servname is not supported for ai_socktype
While the obvious answer is "use the one that works", it'd be good to understand what the difference is and what's causing it.
The first one uses the git protocol and the second one uses the ssh protocol. As github does not provide git protocol access you are getting an error.