简体   繁体   English

Cvs ext方法“连接被拒绝”

[英]Cvs ext method "Connection refused"

I'm using Windows 7 and cygwin .我正在使用Windows 7cygwin I want to connect to our CVS repository with the following command:我想使用以下命令连接到我们的 CVS 存储库:

cvs -d :ext:my_username@my_ip:/my_repo_path/ checkout my-parent

Unfortunately I'm getting this error:不幸的是,我收到此错误:

my_ip:514: Connection refused

How can I provide a password so that I'm able to connect to the server?如何提供密码以便我能够连接到服务器?

my_ip:514: Connection refused

The cvs "ext" method connects using rsh (remote shell) by default.默认情况下,cvs "ext" 方法使用rsh(远程 shell)进行连接。 Port 514 is the standard rsh port.端口 514 是标准的 rsh 端口。 The error "Connection refused" normally means that the remote host isn't accepting connections on the requested port.错误“连接被拒绝”通常意味着远程主机不接受请求端口上的连接。

In other words, you tried to connect to the remote host using rsh, not ssh.换句话说,您尝试使用 rsh 而不是 ssh 连接到远程主机。 But the remote server doesn't accept rsh sessions.但是远程服务器不接受 rsh 会话。 This isn't very surprising, because rsh is a very insecure protocol and it's not widely used any more.这并不奇怪,因为 rsh 是一种非常不安全的协议,并且不再被广泛使用。

To make CVS use ssh instead of rsh, you need to set the CVS_RSH environment variable:要让 CVS 使用 ssh 而不是 rsh,您需要设置 CVS_RSH 环境变量:

$ CVS_RSH=ssh; export CVS_RSH

On unix or linux, you'd normally add this line to your .bashrc, .profile, or one of your other shell startup files so that it's set automatically when you log in. On Windows, this http://superuser.com answer describes how to set environment variables.在 unix 或 linux 上,您通常会将此行添加到 .bashrc、.profile 或其他 shell 启动文件之一,以便在您登录时自动设置。在 Windows 上,此 http://superuser.com 答案介绍如何设置环境变量。 If you're on Windows, you may also need to install an ssh program, because Windows doesn't come with one.如果您使用的是 Windows,您可能还需要安装 ssh 程序,因为 Windows 没有自带。

Once cvs is set to use ssh, ssh will prompt you to type a password if it needs one.一旦将 cvs 设置为使用 ssh,ssh 将提示您输入密码(如果需要)。

The book Open Source Development with CVS has a section about the different cvs repository access methods, including how to set the "ext" method to use ssh. Open Source Development with CVS这本书有一介绍了不同的 cvs 存储库访问方法,包括如何设置“ext”方法以使用 ssh。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM