I am currently having some issues setting up my Xcode Server with a clone of one of my projects in Xcode. I have a MacMini running macOS 10.12 Sierra & Server 5.2 with Xcode Server using Xcode 8.0 (build 8A218a). With the exact same build of Xcode 8.0 running on my development Mac Pro workstation (macOS 10.12), I am able to setup Xcode to utilize my Xcode Server (under Preferences->Accounts) just fine. The problem occurs when I try to clone a local project under Git version control to my Xcode Server. Within Xcode on my Mac Pro, I go to 'Source Control->My Project->Configure.' I then select the '+' sign and select 'Create New Remote.' My Xcode Server URL automatically populates, and I just enter in the 'Remote Name' of the remote Git repository I'd like hosted/managed on my Xcode Server. After clicking 'Create', I receive this error: Unable to perform the request. CFNetwork error: The network connection was lost. (-1005 - kCFURLErrorNetworkConnectionLost). Any ideas why the connection keeps dropping or timing out?
CFNetwork error cloning local Git project repository to Xcode Server
Can anyone assist? My alternative is to try and use a stand-along git server I built with MacPorts on my same development server MacMini, and see if I can clone, push, pull, etc.....from it instead
Hey there @E nd E
Thanks for posting this question. Were you able to solve this issue? I am getting the exact same error alert.
Thanks in advance,
J&A_IT
Hi J&A_IT,
Unfortunately, I still receive the same error. I haven't circled around to debugging the issue more, but for now, I'm going to try a build of git I made with MacPorts, and see if that works instead of Xcode Server's built-in Git repo functionality.
E nd E
Facing the exact same issue.
Thought it may be related to server certificates, but I installed new certificates also and that did not help.
If I creating a repository directly on the server, and access it from Sourcetree, it works.
Similarly, if I open a SCM repository from Xcode 8 it works, it can open it and download the files, and create Bots.
I just cannot create a repository on server from within Xcode, same as you.
Same error here as well. Server is a Mac Pro3,1 with OS 10.11.6 and Xcode 8.1 (release). Development Mac is Mac Pro 6,1 with the same Xcode 8.1.
I have tried resetting the Xcode Server with
sudo xcrun xcscontrol --resetI have also tried some other server names (xxx.local and a fully resolved internet address) as well as some other users on the server. Nothing seems to be working.
Any help would be appreciated.
Thank lawrahbas for this workaround "If I creating a repository directly on the server, and access it from Sourcetree, it works."
Note:
Still getting the same error on creating a repository on server from within Xcode.
Hi we have the same issue when creating a new remote.
We have activated both https and SSH on Mac OS server which runs on a Mac mini in the network.
Unable to perform the request. CFNetwork error: The network connection was lost. (-1005 - kCFURLErrorNetworkConnectionLost)
we can connect to both the server and repositories setup at the server GUI from Xcode on the develeper machines.
Any new information on this?
Best regards,
Michael
I have a similar set up as you and experienced the same problem.
I have the following work around which I'll describe, in the hope that it may help. It involves directly creating an empty git repository on the remote XCode server and then pushing the local repository to that.
To create the empty git repository, assuming you have the necessary rights to do this:
1. Open the Server app and connect to the remote XCode server.
2. When the services populate, you should see the XCode service on the left with a green dot next to it, indicating that the service is running. Click on the XCode service.
3. You should now see the detail panel that relates to your XCode service. Click on the "Repositories" button which discloses a list box with any current repositories you might have.
4. To add the blank repository, click on the "+" button below the repositories list.
5. A data entry sheet appears. In the text box at the top enter the name of your new repository, usually the same as your project. Then click on the "Create" button.
6. After the sheet disappears, you should see your new repository added to the list box. Select that entry on the list and double click it.
7. Another sheet appears detailing your repository. It shows connection URL's and the path to the repository. Highlight and copy the SSH URL to the clipboard.
Now in XCode we need to associate your project with this remote using the URL in the clipboard.
1. Open your project in XCode.
2. From the "Source Control" menu, click on Source Control->Your Project->master->Configure Your Project...
3. A cofiguration sheet appears. Click on "Remotes" in the header.
4. You will probably see a blank view with "No Remotes" in the middle. Click on the "+" button at the bottom and then click on "Add remote..." on the popup.
5. Another sheet appears, probably with the word "origin" in the upper text box. Next to "Addrees:" paste the URL previously copied from the clipboard.
6. Click on the "Add Remote" button which should now become enabled.
7. The new remote now appears in the list. Click "Done" to dismiss the sheet.
If all has gone according to plan, you can now push to your new remote:
1. In the "Source Control" menu click on "Push..." A "Push local changes" sheet appears.
2. The default master "origin/master" drop down should appear, but with the word "Create" in brackets on the first time you do this.
3. Click on the "Push" button. You should then see the text "Push successful" appear.
The remote has now been created and can now receive further push actions.
It would seem to me, though, that the original feature we all attempted to use is broken and perhaps a bug should be filed.
I get a timeout using this method.
Also I have machnies connected by ethernet, when i disable the wifi i get
Unable to perform the request. CFNetwork error: A server with the specified hostname could not be found. (-1003 - kCFURLErrorCannotFindHost)
I've filed two bugs for this, one for the case in which the repository is created along with the project, and one for when a remote is added to an existing project. Both scenarios produce the same error for me as mentioned above (on Server 5.3 and Xcode 8.3.2 at this point). In the latter case, your workaround did help me get around the issue and was noted in the bug report.