Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Apr 27, 2013, 12:28 AM   #1
ArtOfWarfare
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Authenticating GitHub in Xcode?

I'm attempting to clone a project from Github into Xcode. Here's what I'm doing:

1.) Open Organizer -> Repositories
2.) Click the Plus in the Lower Left -> Checkout or Clone Repository
3.) I type in the scheme, wait a moment for it to process that, and it says "Authentication required" and the next button that had been ghosted is lit up and says "Clone"
4.) I hit the Clone button
5.) It asks for a location - I provide it one and press the Clone button again
6.) It tells me that "Xcode can't verify the identity of the server "github.com" - The certification for this server is invalid". If I click on "Show Certificate" it clearly says "This certification is valid" for all the certificates listed in the details pane. So... whatever... hit the "Continue" button.
7.) It shows a spinning wheel saying it's cloning, then it shows:

fatal: <what I gave it in #3>/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

If I hit Try Again, it repeats #5 and #7 (though it skips #6).

If I hit Previous it'll show me a window it never showed me before which says that the "Host is reachable".

I have the git command line tools available so I tried doing git update-server-info in Terminal, but couldn't figure out how that works...

Typing in just $ git update-server-info
Has it say "fatal: Not a git repository (or any of the parent directories): .git

Typing in $ git update-server-info <what I gave it in #3>
Has it say the exact same thing.

Typing in $ git <what I gave it in #3> update-server-info
Has it tell me that "git: '"<what I gave it in #3>"' is not a git command. See 'git --help'. The man page for update-server-info doesn't help at all.

One thing striking me as particularly odd is that Xcode never once asked me for my github username or password... it seems to me that it's obvious that it can't successfully clone from a private repository, because it's not providing any authentication. Or is it? If it is, where the heck is it getting credentials from and how can I fix them? I have multiple github accounts for the different companies I've worked for - how would Xcode know which one to use?

Oh, just so you know, I have:

git version 1.7.12.4 (Apple Git-37)
(According to $ git version)
Xcode version 4.6.2 (4H1003)
OS X version 10.8.3
__________________
Don't tell me Macs don't last: 2007 iMac, 2007 Mac Mini, 2008 MacBook Air, all Vintage.
(iMac obsoletion: April 28, 2015, MBA: October 14, 2015, Mac Mini: March 9, 2016)

Last edited by ArtOfWarfare; Apr 27, 2013 at 12:36 AM.
ArtOfWarfare is offline   0 Reply With Quote
Old Apr 27, 2013, 01:56 PM   #2
Madd the Sane
macrumors 6502
 
Join Date: Nov 2010
Location: Utah
Try using the command line to clone the git repo.
Madd the Sane is offline   0 Reply With Quote
Old Apr 27, 2013, 03:34 PM   #3
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
I typed in

$ git clone https://github.com/<company>/<product>.git

It responded:

Cloning into '<product>'...
fatal: https://github.com/<company>/<product>.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

Again, it never asked for a username or password of any sort.

Last edited by ArtOfWarfare; Apr 27, 2013 at 04:32 PM.
ArtOfWarfare is offline   0 Reply With Quote
Old Apr 27, 2013, 04:42 PM   #4
Madd the Sane
macrumors 6502
 
Join Date: Nov 2010
Location: Utah
If you go to the github's site for the project, it will provide a link for you to clone. The URL doesn't look like any GitHub URL I've grabbed. Usually it'll have the user name at the beginning of the URL.
Madd the Sane is offline   0 Reply With Quote
Old Apr 27, 2013, 05:08 PM   #5
ArtOfWarfare
Thread Starter
macrumors 603
 
ArtOfWarfare's Avatar
 
Join Date: Nov 2007
Send a message via Skype™ to ArtOfWarfare
Quote:
Originally Posted by Madd the Sane View Post
If you go to the github's site for the project, it will provide a link for you to clone. The URL doesn't look like any GitHub URL I've grabbed. Usually it'll have the user name at the beginning of the URL.
Okay. I'll ask the project owner if they'll give me access to see it on the Github website.
ArtOfWarfare is offline   0 Reply With Quote
Old Apr 28, 2013, 10:29 AM   #6
Guiyon
macrumors 6502a
 
Join Date: Mar 2008
Location: North Shore, MA
Quote:
Originally Posted by ArtOfWarfare View Post
I typed in

$ git clone https://github.com/<company>/<product>.git

It responded:

Cloning into '<product>'...
fatal: https://github.com/<company>/<product>.git/info/refs?service=git-upload-pack not found: did you run git update-server-info on the server?

Again, it never asked for a username or password of any sort.
Cloning via that URL should be working fine, I haven't played with it much though. Something sounds really suspicious if you're getting certificate errors. Github's certificate is a DigiCert EV, it should have the root CA trusted in most (if not all) browsers. You may have better luck trying the git or ssh URIs.

Is this a public or private repo you are connecting to, and are you using a business or home internet connection (business connections could have proxies/caches that interfere with git)? If it's a public repo, I would either try the SSH URI (assuming you have your SSH keys setup) or using the git read-only URI (starts with git://). If it's a private repo, your only other choice for R/W would be to grab it via the ssh URI (git@github.com:<user>/<repo>). One thing to note is that github will not ask you for username/password info if you use the SSH method; everything is done via public/private keys.
__________________
Make life easier if you have a programming question!
http://www.sscce.org/

Last edited by Guiyon; Apr 28, 2013 at 10:39 AM.
Guiyon is offline   0 Reply With Quote
Old Apr 28, 2013, 12:44 PM   #7
nexusrule
macrumors regular
 
Join Date: Aug 2012
The git repository address is NOT the github URL for the software page.

Example:

Url of the page on github https://github.com/twitter/bootstrap

Url of the repository https://github.com/twitter/bootstrap.git (or git@github.com:twitter/bootstrap.git if you want to use SSH but then you need to authenticate and you need to have ssh keys, see guide on github).

You don't need the owner to do nothing to get those addresses, you can see them in the project page here:

http://gyazo.com/4919b2e6aaf291ad519041f9706dba9a
nexusrule is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
Automated tool to reveal throttling and overheating - GitHub qnxor MacBook Pro 167 Sep 30, 2014 08:24 AM
Eve of Impact open sourced on GitHub rikschennink iPhone/iPad Programming 0 Oct 30, 2013 04:34 AM
Authenticating a Steve Jobs signature epoxy2600 Apple Collectors 4 Feb 22, 2013 09:38 AM
Platform Independent Script after Github Pull? ArtOfWarfare Mac Programming 1 Jan 20, 2013 01:25 PM

Forum Jump

All times are GMT -5. The time now is 06:42 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC