subclipse RA layer request failed

75 篇文章 0 订阅

     总算能通过代理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 failed svn: 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 it Ok, 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 tunnel For 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:443 Note 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-proxy Privileged ports can only be forwarded by root Lying to your git/svn/hg client On 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 localhost6 127.0.0.1 pmd.svn.sourceforge.net Let’s try it… $ git-svn rebase First, rewinding head to replay your work on top of it... Applying: Quite often people joke about 'compile = tested = committed'... Well i didn't even compile this last commit ! Sorry about this, this is fixed now ... 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…

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值