[以解决]subclipse RA layer request failed

来源:互联网 发布:mac能打拼音吗 编辑:程序博客网 时间:2024/04/28 23:01
更新11:35OK了,总算能通过代理checkout googlecode了。心情这个激动啊。不过,我也花费了一个上午的时间。。。解决办法还是设置C:/Documents and Settings/yanx730/Application Data/Subversion/servers文件我原理是在一个group中设置的代理参数。正确的做法是在“[global]”中设置即可。我这里设置了下面四个参数就ok了。http-proxy-host = http-proxy-port = http-proxy-username = http-proxy-password = ——————————————————————————分割线 ————————————————————————————————对于计算机软件开发来说,自己的电脑设置了代理,真是很头痛的一件事。这不,我的电脑就有这么一个代理。目前在做Android开发,可是无论怎么设置代理,模拟器就是不能上网。Eclipse的插件安装也得自己在家下好了插件然后到公司装,别指望能直接输入个网址然后就能自己下载安装。今天,安装了一个subclipse,想用谷歌code来做同步。方便在家和公司开发。无奈,svn不能添加仓库。错误如下: RA layer request failedsvn: OPTIONS of 'https://xxx.googlecode.com/svn/trunk': could not connect to server (https://xxx.googlecode.com)尝试了修改C:/Documents and Settings/yanx730/Application Data/Subversion/servers文件,不行。网上一搜,看到了一个貌似可以解决的办法,Proxy messing with svn/git/hg链接http://cache.baidu.com/c?m=9f65cb4a8c8507ed4fece763101cdd71192383683fc0d0627fd38448e4645a475a23befb716050539284617000db0b4beb863679361765eadb9e870a8eac925971db6c63300b863052845ae89c0763d620e10ebaf447b0ece732e2f3909584090f8b44050bd1add70657458c&p=8e769a41ca825bf308e29275555d&user=baidu(是百度cache,直连被打不开,谷歌也被封掉很多业务,包括cache)文章内容如下:(我就不尝试了,累了,期待那位仁兄遇到了这个问题,试试下面的方法是否可以。)God I hate proxies ! There is always one to prevent you of doing something in quite useless way. I say useless because it is always more and less easy to workaround, so it does not really stop anything, it just gives us more work… Grr…What the f**ck is going on ?Ok, so let’s say you did some hack with git-svn on a project using svn on sourceforge. For instance, pmd. You want to commit (well, dcommit with git-svn) and you run into this:RA layer request failed: OPTIONS of'https://pmd.svn.sourceforge.net/svnroot/pmd':could not connect to server (https://pmd.svn.sourceforge.net)...At first, you think “ok, i didn’t set the proxy right in the ~/.subversion/servers file”, but when you do, you find out this won’t work either ! Maybe the dns used by the proxy, can’t locate the resolve the name properly ? I don’t know but this is really a pain in the ass…Anyway, either by bad configuration (more likely) or just to frag with you, the proxy just forbide you to commit/checkout on HTTP… (but most likely it will let you access some completly deviant porn site hosted somewhere on the net ! Great ! That was really helpful ! Thanks Mister Proxy ! )Tunneling your way out of itOk, so let’s hack it quickly around, so to be able to say that, once again, proxies and firewalls mess up with people that more likely can’t harm your network, but certainly does not stop those who can…Setting up the tunnelFor this hack to work, you have to have access sshd server running somewhere on port 443 (Well, who doesn’t ? ) and a tool to create a tunnel through the http proxy (i use proxy tunnel, but it would work with an other one). Once you have this running, just add the following entries (adapted to your environement obviously) to the ~/.ssh/config file:Host sshd-server-through-proxy ProxyCommand proxytunnel -p DAMN-PROXY:ITS-PORT -d SSHD-SERVER:443 LocalForward 80 pmd.svn.sourceforge.net:80 LocalForward 443 pmd.svn.sourceforge.net:443Note that as you are redirecting privileged port, you have to be root to run the command (that the purpose of the ‘User’ entry up there):$ ssh sshd-server-through-proxyPrivileged ports can only be forwarded by rootLying to your git/svn/hg clientOn the tunnel is set up, you just have to add an entry in your /etc/hosts file to make him believe that the pmd.svn.sourceforge.net host is your computer.cat /etc/hosts# Do not remove the following line, or various programs# that require network functionality will fail.127.0.0.1 localhost.localdomain localhost osc-portos::1 localhost6.localdomain6 localhost6127.0.0.1 pmd.svn.sourceforge.netLet’s try it…$ git-svn rebaseFirst, rewinding head to replay your work on top of it...Applying: Quite often people joke about'compile = tested = committed'... Well i didn't evencompile this last commit ! Sorry about this, this is fixednow...Hop, we tunneled our way out of it… Meanwhile, our “less geek” buddies can’t and the admin who set this stupid proxy up just forced us to use even more encryption over the networks, rather than using clear http query and response. A great victory for nobody but sillyness…