无法连接到VisualSVN Server,无法连接SVN服务器

使用checkout指令从SVN服务器下载代码一定要注意格式。

# 将svn服务器上的 "dir"文件夹拷贝到本地 "/Users/local_dir"
svn checkout svn://xxx.xxx.xxx.xxx/dir --username=your_name --password=your_password /Users/local_dir

这是网上许多教程给出的答案,但却遗漏了比较重要的一点,那就是SVN服务器的协议。

需要根据协议来书写名令才能正确拉取代码,有svn协议和http/https协议。

如果使用类似于VisualSVN Server这种基于http协议的SVN服务器,不能使用上面这种格式,需要通过http请求来拉取代码。否则就会报下面的错误,无法连接到ip所在的SVN服务器。

svn: E170013: Unable to connect to a repository at URL 'svn://xxx.xxx.xxx.xxx/dir'
svn: E000060: Can not connect to host 'xxx.xxx.xxx.xxx': Operation timed out

正确格式:

# 修改协议为https或者http
svn checkout https://xxx.xxx.xxx.xxx/dir --username=your_name --password=your_password /Users/local_dir

如下图:
在这里插入图片描述

结论

一定要清楚SVN服务器使用的协议,正确发出请求。

参考

【SVN】——svn协议和http协议

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值