我正在使用 VisualSVN Server 3.0.1 和 TortoiseSVN 1.8。使用 VisualSVN 服务器管理器,我在我的 C:\驱动器中创建了一个名为“lottery”的存储库。我在机器上启动了所有 VisualSVN Server 的服务。我检查了 VisualSVN Server 的 HTTP 服务是否正在运行,VDFS 服务是否正在运行。我还使用 VisualSVN 服务器管理器让两个用户 harry 和 sally 使用密码 1234。我创建了一个目录 C:\workdirs。在那里,我的用户有两个文件夹 harry 和 sally。当我导航到 harry 的文件夹并运行我的 svn 命令时,出现错误。请帮我解决一下。
C:\workdirs\harry>svn co --username harry --password 1234 https://james/svn/lottery/
该 url 是从 VisualSVN 服务器管理器中复制粘贴的。我收到错误 -
C:\workdirs\harry>svn co --username harry --password 1234 https://james/svn/lottery/
svn: E731001: Unable to connect to a repository at URL 'https://james/svn/lottery'
svn: E731001: No such host is known.
我尝试过的解决方案 -
Tortoise won't connect to subversion server
Apparently, you can’t go straight to the SVN folder you need to include a repository file name in the path.
所以,我尝试使用带有端口的 url 和 repo 文件夹名称来查看它是否有帮助 svn co --username harry --password 1234 https://james:443/svn/lottery/
顺便说一句,james 是我在可视化 svn 服务器属性中看到的 svn 服务器的名称。
产生的错误是——
svn: E731004: Unable to connect to a repository at URL
'https://james/svn/lottery'
svn: E731004: The requested name is valid, but no data
of the requested type was found.
接下来,我尝试使用http而不是https,但得到了同样的错误。
下一步,我尝试使用这样的 url https://localhost/james:443/svn/lottery/
我得到了错误 -
Error validating server certificate for 'https://localhost:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
- The certificate hostname does not match.
Certificate information:
- Hostname: steam
- Valid: from sometime in 2014 GMT until sometime in 2020 GMT
- Issuer:
- Fingerprint: 6a:7b:8c:....
(R)eject, accept (t)emporarily or accept (p)ermanently? p
svn: E175013: Unable to connect to a repository at URL
'https://localhost/james:443/svn/lottery'
svn: E175013: Access to '/james:443/svn/lottery' forbidden
最后,我想到了使用我提供的链接中提到的计算机的 IP 地址。我不知道 IP 是什么,但我尝试改用 localhost
并且成功了!!!
C:\workdirs\harry>svn co --username
harry --password 1234 https://localhost/svn/lottery/
Checked out revision 0.
最佳答案
这对我有用 -
svn co --username harry --password 1234 https://localhost/svn/lottery/
我不必在 localhost 后添加端口号。它有效,但我不知道发生了什么。顺便说一句,在运行此命令之前,请确保您的 Visual SVN 窗口服务正在运行。
关于windows - 无法连接到本地svn服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27975987/