简体   繁体   中英

Cannot connect to local svn server

I am using VisualSVN Server 3.0.1 and TortoiseSVN 1.8. Using VisualSVN Server Manager, I made a repository called "lottery" in my C:\\ drive. I started all the VisualSVN Server's services on the machine. I checked VisualSVN Server's HTTP service is running and VDFS service is running. I also made two users harry and sally with password 1234 using VisualSVN Server Manager. I made a directory C:\\workdirs. In that, there are two folders harry and sally for my users. When I navigate into harry's folder and run my svn command, I get an error. Please help me to resolve it.

C:\workdirs\harry>svn co --username harry --password 1234 https://james/svn/lottery/

That url is copy pasted exactly from VisualSVN Server Manager. I get the error -

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.

Solutions I tried -

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.

So, I tried to use the url with port and the repo folder name to see if it helps svn co --username harry --password 1234 https://james:443/svn/lottery/ Btw, james is the name of the svn server i saw in the visual svn server properties.

The resulting error is -

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.

Next , I tried to use http instead of https and got the same error.

Next , I tried to use the url like this https://localhost/james:443/svn/lottery/

I got the error -

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

Finally, I thought of using my computer's IP address as mentioned in the link I gave. I don't know what the IP is, but I tried using localhost instead and it worked !!!

C:\workdirs\harry>svn co --username 
harry --password 1234 https://localhost/svn/lottery/
Checked out revision 0.

This worked for me -

svn co --username harry --password 1234 https://localhost/svn/lottery/

I did not have to add a port number after localhost. It works, but I don't know what happened. Btw, make sure that your Visual SVN windows services are running before you run this command.

Your local DNS is unaware about that "james" hostname represents your computer therefore you get the No such host is known error. If you work with VisualSVN Server alone, you could add a reference that "james" is your computer's name to your hosts file.

Otherwise, contact your network administrator and ask about what is your computer's hostname on your LAN.

Go to your project folder Right Click go to your tortiseSvn --> Relocate --> change your svn repository url 在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM