如何在 Windows 服务器上设置带有 collabnet Subversion Edge 的 SVN 服务器,以及如何在 Mac 上使用 Xcode 远程连接到它?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/13172201/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to setup a SVN server with collabnet subversion edge on windows server, and how to connect to it remotely using Xcode on Mac?
提问by Mike
I am a newbie about SVN server. I've certainly used SVN to check in/out codes before, but never learned how to setup a Subversion server it up from ground up.
我是 SVN 服务器的新手。我以前肯定使用过 SVN 来签入/签出代码,但从未学会如何从头开始设置 Subversion 服务器。
What I have:
我拥有的:
Server | Windows Server 2012 Standard, Activated:
服务器 | Windows Server 2012 标准版,已激活:
- Installed Collabnet Subversion Edge,
- Created a repository,
- Created users and also started the server, using start button at GUI on
localhost:4434/csvn/
.
- 安装 Collabnet Subversion Edge,
- 创建了一个存储库,
- 创建用户并启动服务器,在 GUI 上使用启动按钮
localhost:4434/csvn/
。
Client | MacOSX Mountain, with Xcode 4.5 Installed:
客户 | MacOSX Mountain,安装了 Xcode 4.5:
I have tried to add repository by using the external IP address and the repository name
like https://1.1.1.1/svn/
, but as expected, it does not work and says "Host is unreachable".
我尝试使用外部 IP 地址和存储库名称添加存储库,如https://1.1.1.1/svn/
,但正如预期的那样,它不起作用并显示“主机无法访问”。
I have tried to use the local hostname, no luck either. Although I did notice in their documentation, they mentioned IP address setting, but I cannot find it anywhere.
我曾尝试使用本地主机名,但也不走运。虽然我确实在他们的文档中注意到,他们提到了 IP 地址设置,但我在任何地方都找不到。
I would like to make it so that users can access and use the SVN repository remotely and locally.
我想让它让用户可以远程和本地访问和使用 SVN 存储库。
I have no idea what to do, please help me. Thanks for your time!
我不知道该怎么办,请帮助我。谢谢你的时间!
回答by Mark Phippard
Go back to the server for a minute. When you are configuring it, are you only using the local web browser? Have you tried accessing the server using web browser from your Mac? I would see if the Mac can reach the web gui first. Maybe you have network issues you have to resolve, such as DNS, routing or firewall.
回到服务器一分钟。配置的时候,是不是只使用本地浏览器?您是否尝试过使用 Mac 上的 Web 浏览器访问服务器?我会先看看 Mac 是否可以访问 web gui。也许您有必须解决的网络问题,例如 DNS、路由或防火墙。
In terms of using XCode, or any SVN Client, the URL you must enter is the URL to your repository. That will not be:
就使用 XCode 或任何 SVN 客户端而言,您必须输入的 URL 是存储库的 URL。那不会是:
https://1.1.1.1/svn/
https://1.1.1.1/svn/
It will be something like:
它会是这样的:
https://1.1.1.1/svn/reposname
https://1.1.1.1/svn/reposname
In the Subversion Edge web GUI if you go to the list of repositories, you will see an example checkout command next to each repository. This command shows you the URL to enter in a SVN client to reach the root of the repository. Example screenshot here:
在 Subversion Edge Web GUI 中,如果您转到存储库列表,您将在每个存储库旁边看到一个示例检出命令。此命令显示要在 SVN 客户端中输入以到达存储库根目录的 URL。示例截图在这里:
https://ctf.open.collab.net/sf/projects/svnedge/screenshots/screens/repos/repos.png
https://ctf.open.collab.net/sf/projects/svnedge/screenshots/screens/repos/repos.png
回答by Mike
I think I have sloved the problem. I knew I have to access the repo using my external IP address somehow, but when I tried something like, for example my IP is 1.1.1.1, when I typeed https://1.1.1.1/svn/reposname
, I got a no response message.
我想我已经解决了这个问题。我知道我必须以某种方式使用我的外部 IP 地址访问 repo,但是当我尝试类似的东西时,例如我的 IP 是 1.1.1.1,当我输入时https://1.1.1.1/svn/reposname
,我没有收到响应消息。
I figured that since there are more than 1 computers on my local network, the router has to somehow direct the request to my server only, not some other machine. After some reaserch I found that port forwarding does the trick. Since apache server uses port 80 as default, just get the default gateway ip using ipconfig from CMD, then enable port forwarding for port 80, to the server's local ip address. At least I can access it using my external ip on my local network. I will try to access it remotely and see.
我认为由于我的本地网络上有超过 1 台计算机,路由器必须以某种方式将请求定向到我的服务器,而不是其他机器。经过一番研究,我发现端口转发可以解决问题。由于apache服务器默认使用80端口,只需在cmd中使用ipconfig获取默认网关ip,然后开启80端口转发到服务器本地ip即可。至少我可以使用本地网络上的外部 IP 访问它。我会尝试远程访问它并查看。