[英]Can't access Mac server from Xcode
I wanted to create a remote repository in my Mac server. 我想在Mac服务器上创建一个远程存储库。 I have installed the app, configured and started the Xcode service as per the Apple docs. 我已经按照Apple文档安装了该应用程序,配置并启动了Xcode服务。 But when I try to add the server to my accounts in Xcode, the server name is there, but on adding, it is giving the following error. 但是,当我尝试将服务器添加到使用Xcode的帐户中时,服务器名称在那里,但是添加时却出现以下错误。
Unable to perform the request. 无法执行请求。 CFNetwork error: The network connection was lost. CFNetwork错误:网络连接丢失。 (-1005 - kCFURLErrorNetworkConnectionLost) (-1005-kCFURLErrorNetworkConnectionLost)
The server is hosted on the same Mac in which I am developing. 该服务器托管在我正在开发的同一台Mac上。
I've run into the same issue (my server is on the LAN but it had previously been working). 我遇到了同样的问题(我的服务器在局域网上,但是以前一直在工作)。
I'm assuming you've got a Git repository created locally and you want to push it to the server. 我假设您已经在本地创建了一个Git存储库,并且希望将其推送到服务器。 I'm using Xcode 8.2 我正在使用Xcode 8.2
The only 'solution' I've found so far is to manually create the remote from the Mac Server app (you could also do it on the command line if you want). 到目前为止,我发现的唯一“解决方案”是从Mac Server应用程序手动创建遥控器(如果需要,也可以在命令行上进行操作)。 The steps I used: 我使用的步骤:
Not the best solution, but as I say, it's the only one I've found so far. 这不是最佳解决方案,但正如我所说,这是我到目前为止发现的唯一解决方案。 Quite a few people seem to be asking this, but none of them seem to have found better answers either. 似乎有很多人在问这个问题,但他们似乎都没有找到更好的答案。 To find some of the other people reporting the problem, I used the following search term in google: 为了找到其他报告问题的人,我在Google中使用了以下搜索词:
git unable to perform the request cfnetwork error the network connection was lost xcode
Just do the following steps : 只需执行以下步骤:
1.Remove your Server from Xcode 1.从Xcode删除服务器
2.Quit Xcode 2.退出Xcode
3.Restart/Shutdown machine (If I don't restart/shutdown machine, unable to add server again in my case) 3.重新启动/关闭计算机(如果我不重新启动/关闭计算机,则无法重新添加服务器)
4.Open Xcode 4,打开Xcode
5.Add Server again 5,再次添加服务器
This Solution works for me, but its not proper solution. 此解决方案对我有用,但不是正确的解决方案。 It's headache to repeat the above steps every time while facing same issue, I research more on this but did not get any proper satisfactory solution. 面对相同的问题时,每次重复上述步骤都是令人头疼的事,我对此进行了更多研究,但未获得任何适当的满意解决方案。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.