如何才能“cvs 注销”?不工作?
我使用的是 Windows XP 系统,我从命令行执行此命令:
cvs -d :pserver:CharlesAnderson@ServerName/RepositoryName login -p <pw>
它将生成此响应:
Logging in to :pserver:CharlesAnderson@servername:2401:/RepositoryName
如果我然后键入:
cvs logout
我收到此消息:
cvs logout: bad CVSROOT - Cannot specify port: ":pserver:CharlesAnderson@ServerName:2401/RepositoryName"
重新启动我的电脑没有帮助。我是如何陷入这种状态的,又该如何摆脱这种状态?
I'm on a Windows XP system, and I execute this command from the command line:
cvs -d :pserver:CharlesAnderson@ServerName/RepositoryName login -p <pw>
which generates this response:
Logging in to :pserver:CharlesAnderson@servername:2401:/RepositoryName
If I then type:
cvs logout
I get this message:
cvs logout: bad CVSROOT - Cannot specify port: ":pserver:CharlesAnderson@ServerName:2401/RepositoryName"
Rebooting my PC didn't help. How have I got into this state, and how can I get out of it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于您没有为
logout
命令指定 CVSROOT(即-d
选项),CVS 只能从环境块或已检查的元数据中获取该 CVSROOT。输出工作副本(即./CVS/Root
文件)。难道是您通过环境变量指定了 CVSROOT 并忘记了第二个冒号(即端口号后面的冒号)?此外,不需要明确指定端口 2401,因为它已经是:pserver:
的默认端口(在您的示例中,您在运行login< 时实际上没有指定端口/代码> 命令)。
无论如何,只有当指定的 CVSROOT 与用于登录的 CVSROOT 匹配时,
logout
才会起作用。最后,您应该知道
login
和logout
不会分隔“会话”。 CVS 使用无会话协议。login
命令的实际作用是在本地缓存您的密码,这样您就不必为每个命令重新输入密码(CVS 每次都会从缓存中隐式读取密码)。Logout
会再次从缓存中删除密码,因此下次运行命令时,您必须再次输入密码。As you did not specify a CVSROOT (i.e.
-d
option) for thelogout
command, CVS can only get this either from the environment block or from the metadata of an already checked out working copy (i.e. the./CVS/Root
file). Could it be you specified the CVSROOT via an environment variable and forgot the second colon (i.e. the one after the port number)? Also, specifying port 2401 explicitly shouldn't be necessary as it is already the default port for:pserver:
(and in your example you actually did not specify the port when you ran thelogin
command).In any case
logout
will only work when the specified CVSROOT matches the one that was used for login.Finally, you should be aware that
login
andlogout
do not delimit a "session". CVS uses a session-less protocol. What thelogin
command actually does is locally cache your password so you won't have to reenter it for every command (CVS implicitly reads it from the cache each time).Logout
removes the password from the cache again so the next time you run a command you will have to enter it again.