Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.9: Convert gitolite managed git repositories to Xcode Server OS X Server
So you finally want to take the plunge and convert from gitolite managed repositories and Jenkins to doing everything with Mavericks' Xcode Server? It turns out it's actually not that hard.

Disclaimer: I just figured this process out, everything appears to work (pulling the repository, committing/pushing back to the repository after making changes. I think that everything should be working properly outside of my very basic tests, but they were very limited.

Converting gitolite repositories for Xcode server.
  • Find your repositories folder (for me i had a special 'git' user so the repositories folder was in /Users/git/repositories).
  • Create a tarred gzip file (as admin with following settings) to create carbon copies of the directories preserving ownership and permissions:

    sudo tar cpz -P --exclude .DS_Store -f repositories.tgz /Users/git/repositories

  • Copy this tgz file to the new server (if it is in fact a new server).
  • Extract the file to your Desktop.
  • Change the owner to the proper owner expected by Mavericks' Xcode server:

    sudo chown -R 94:70 ~/Desktop/respositories/

  • Change the directories to have the proper permissions:

    sudo chmod -R 0777 ~/Desktop/repositories

  • Each repository has a config file inside it, gitolite gives different default configs than Xcode server, and it's important that they match up with what Apple expects. For my gitolite config files they all looked like this:
    	[core]
    		repositoryformatversion = 0
    		filemode = true
    		bare = true
    		ignorecase = true
    		precomposeunicode = false
    
    While an example test repository made from scratch with Mavericks' Xcode Server is:
    	[core]
    		repositoryformatversion = 0
    		filemode = true
    		bare = true
    		ignorecase = true
    		precomposeunicode = true
    		sharedrepository = 1
    	[receive]
    		denyNonFastforwards = true
    
    So I replaced all the config files contents for every repository with that and everything appears to work seamlessly as if Xcode had created the repositories.
  • Make sure the server app is NOT running and then move all of your repositories into /Library/Server/Xcode/Respositories/git/
  • 9. Open the Server app, choose the Xcode option in the sidebar and then choose the Repositories tab and all of your repositories SHOULD be visible. This will keep your commit histories intact (I havent tried reverting to them or anything, but I assume it should work)
For the more curious, this is how I determined the gid's for _teamserver and _www:

dscl . -list /Users UniqueID

[crarko adds: I haven't tested this one, but I am planning to set up such a server so it would be great to hear what people think of Xcode server in general, as well as the specifics of this hint.]
    •    
  • Currently 1.17 / 5
  You rated: 3 / 5 (35 votes cast)
 
[6,272 views]  

10.9: Convert gitolite managed git repositories to Xcode Server | 0 comments | Create New Account
Click here to return to the '10.9: Convert gitolite managed git repositories to Xcode Server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.