SoftTimur
SoftTimur

Reputation: 5510

svn: OPTIONS of 'https://...': could not connect to server

At work, I am trying to do a svn checkout https://... in a terminal, and I got the error: svn: OPTIONS of 'https://...': could not connect to server (https://...)

I can open the address https://... in my internet explorer, after entering the login and password, I can see the files in it.

Always in my internet explorer, my current setting of proxy is None.

Previously, to make svn works at home, people have inserted the following lines to my file /etc/subversion/servers:

[global]
http-proxy-host = kuzh.xxx.fr
http-proxy-port = 8080

Under this context, does anyone know how to solve this ... could not connect to server ... error?

Edit1 At the moment I am trying the same command at home, and it works. So I think @J.N. is right... I should make the http-proxy-host and http-proxy-port under a [group] so that it is taken into account only when I am at home, and not considered when I am elsewhere...

Now, the question is how to specify the [group] in /etc/subversion/servers so that it knows that I am at home or not...

Upvotes: 9

Views: 30673

Answers (5)

Or A.
Or A.

Reputation: 1276

I've tried all answers posted before me, but none worked.

The only solution I found was simply restarting my laptop.

Then everything worked like before, no change needed in any svn config files etc.

I don't know why this happened, especially since no change was needed to fix this, meaning no change was done by me or any proxy changes were made neither.

Upvotes: 0

Jonathan L
Jonathan L

Reputation: 10678

I'm running Oracle Linux 6.6 64-bits as a VM guest (Windows 7 as host) behind company proxy, when I run command

svn co http://svn.code.sf.net/p/flashcard4cn/code/trunk flashcard4cn 

got error message

svn: OPTIONS of 'http://svn.code.sf.net/p/flashcard4cn/code/trunk': Could not resolve hostname `svn.code.sf.net': Host not found (http://svn.code.sf.net)

after added the following two lines under /home//.subversion/servers under [global]

[global]
http-proxy-host = proxy.**.com
http-proxy-port = 80

The errors went away, and check out successful. Some of you mentioned the same thing not worked, but it does work for me for Oracle Linux 6.6

Upvotes: 1

ashmew2
ashmew2

Reputation: 327

I had a similar issue, i use a proxy in my college, and no proxy at home.

It kept giving me the "could not connect to server" error.

All i had to do was comment the lines under the [global] section:

[global]

# http-proxy-host = kuzh.xxx.fr

# http-proxy-port = 8080

under these two files:

/etc/subversion/servers

/home/<username>/.subversion/servers

and that resolved the issue. Apparently, local configs are generated for all users that are using svn, so you need to remove the proxy from your user account as well when you want to get rid of the proxy.

Upvotes: 4

simo
simo

Reputation: 76

I had a similar issue trying a simple update on my server.

svn update

I received the same error svn: OPTIONS of 'https://...': could not connect to server (https://...)

I simply supplied my svn username and password once and it rectified the problem

svn update --username my_user_name --password xxxxxx

Upvotes: 2

J.N.
J.N.

Reputation: 8421

First, try to comment the said lines to avoid using a proxy server and test if it works (that is add a # at the beginning of each line.

If it doesn't, then you're stuck. There is probably a proxy between you and the SVN server that prevents from using Subversion feautures (Note: some proxies are transparent, and need not be configured, they "catch" your requests automatically).

If it does otherwise, you can create a [group] section in the configuration to only use a proxy for some servers instead of a global configuration.

Upvotes: 2

Related Questions