How to use Xcode 9 integrated server with local git repositories

Hi,


Before Xcode 9 I used the Xcode Server with the integrated Git server. Now I updated to Xcode 9 with the integrated Xcode server and have no Git server anymore.

I tried to setup the integrated Xcode server and creted a bot on a local git repository (a git server does not exists any more). This failed with the message "unexpected https error: 404" which basically means that the address is not valid.


Does anyone know if I can create a bot in Xcode 9 on a local git repository? At least the dialog allows to chose the local git repositories.

I don't want to use Github! Do I have to setup my own git server now?


Thanks for you hints and comments

Sven

Replies

Same problem here.


Does anyone know how to recover all our code trsuted to the previous Xcode Server platform?

I have the same problem as well. It is really annoying that Apple removed the git server from macOS Server.

While continuous integration is good and probably everybody should do it, serving git repositories is much more important/essential.


And why Gihub and not Bitbucket?

The machine, that you originally had hosting the git repos, is almost 99% still hosting those previous xcode server git repos, mine are still intact and there. They are just run by the git binariy, and are served via ssh commands.


If you have to setup a new git server, that's plastered all over the internet!


But normally all you have to do it have your ssh keys setup, init (on server) and create and init then push (on client)


A) This assumes you set your ssh keys up already

B) This assumes you had a past Xcode 6/7/8 Server with a symlink called:

/git -> pointing to /Library/Developer/XcodeServer/HostedRepositories

C) If not you can put it where you want as long as you have git running at least

This is all while as an admin or sudo su, or sudo bash, or sudo all command to get thru!


ON SERVER

cd /git # Goto git reservoir

mkdir -p repoTest.git # Make git dir

cd /git/repoTest.git # Go inside

git --bare init # Initialize repository

git config core.sharedRepository group # Update the git's config, group is keyword don't replace

chgrp -R <group-name> . # Change files and directories' group, I use: admin

chmod -R g+w . # Change permissions

chmod g+w objects/pack # If you get push errors


goto Xcode, and create a mac project on the server called repoTest

at ~/ or some convienant developer dirctory you use


ON CLIENT (with ssh/keys)

cd ~/repoTest

echo "# repoTest" >> README.md

git init

git add README.md

git commit -m "first commit"

git remote add origin ssh://<user_name>@<server_url>/git/repoTest.git

git push -u origin master


THEN DROP INTO SourceTree.app (HAHA)


Push Like Crazy Commit Checkout Branch etc etc


You should be good to go!

Hope this helps you guys out...


Laters...

Thanks rezwits. This worked.🙂