Unknown hostname localhost when connecting to SVN

旧时模样 提交于 2019-12-24 13:33:54

问题


I have a RedHat 6 enterprise server that I have installed SVN 1.6 on. This machine is not on a network and has never been on a network. Eventually, it will be added to a network but not right now.

I am running svnserve to provide access to the repository.

svnserve is started as,

svnserve -d

When I run the command, svn co svn://localhost/<project name> I get the error message, "svn: E000111" Can't connect to host 'localhost': connection refused.

netstat confirms that svn is listening on 0.0.0.0:3690.

I have read it pays to be more explicit with svnserve so I started it as follows,

svnserve -d --listen-port 3690 --listen-host 0.0.0.0 (also tried 127.0.0.1)

I get the same connection refused error message when trying to checkout.

Next I tried checking out directly with the ip address rather than a hostname,

svn co svn://127.0.0.1/<project>

The error message I get back is nonsensical, "svn: E670009: unknown hostname '127.0.0.1'".

At this point I am stumped. I can't seem to perform a checkout using the "svn://" protocol. I have already disabled the ipv4 and ipv6 firewalls.

Any thoughts?


回答1:


When you have a network error, you can use the telnet command to see if you can connect to that port. You should see a response like this:

$ pint localhost   # Does this give you anything?
$ telnet localhost 3690
Connected to localhost.
Escape character is '^]'.
( success ( 2 2 ( ) ( edit-pipeline svndiff1 absent-entries commit-revprops...

It could be that your network was setup to block port 3690. Check your software firewall and how SEL is setup.




回答2:


svn co svn://localhost:3690/project name

you should add port number in the svn path.Try commands above.




回答3:


Not quite an answer, but you could try checking out over ssh (assuming the server is running an appropriate server).

This would be something like:

svn co svn+ssh://127.0.0.1/<project>


来源:https://stackoverflow.com/questions/16867331/unknown-hostname-localhost-when-connecting-to-svn

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!