如何从任何目录启用 svn 命令?

发布于 2024-07-22 05:26:43 字数 307 浏览 5 评论 0原文

我最近在Windows Server 2003上安装了SVN。如果我在bin目录(program files\subversion\bin)中,我可以在命令提示符中执行svn命令。 但是尝试在任何其他目录中执行命令会导致

“svn”不被识别为内部或外部命令、可操作程序或批处理文件

我在哪里出错了?

编辑 我检查了环境变量中的 Path 值,它就在那里。 我为我的用户和系统添加了以防万一但没有乐趣?

编辑 就神奇地开始工作了。 随机的

I have recently installed SVN on Windows Server 2003. I can execute svn commands in the command prompt if I am in the bin directory (program files\subversion\bin). But trying to execute commands in any other directory results in

'svn' is not recognized as an internal or external command, operable program or batch file

Where am I going wrong here?

EDIT
I checked the Path value in environment variables and it is in there. I added for my user as well as system just in case but no joy?

EDIT
Just magically started working. Random

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

梨涡 2024-07-29 05:26:43

您需要将保存 svn 二进制文件的文件夹添加到 PATH 环境变量中。

为此,请点击“Windows+暂停”,然后单击“高级”选项卡和“环境变量”按钮,然后享受可怕的编辑器。

更新:请注意,环境通过继承工作,它不是您编辑的全局“事物”,可以将其视为由每个新启动的程序继承的模板。 因此,如果您打开命令窗口,输入“svn”并收到“未找到”错误,然后在上面描述的对话框中编辑路径并重试,则不会发生任何情况。

这是因为命令窗口正在使用其启动时获得的环境副本来工作。 因此,更改环境变量后,打开一个新的命令窗口,它应该可以工作。

You need to add the folder that holds the svn binary to your PATH environment variable.

To do this, hit Windows+Pause, then click the Advanced tab, and the Environment Variables button, and enjoy the horrible editor.

UPDATE: Note that the environment works by inheritance, it's not a global "thing" that you edit, think of it as a template that is inherited by every newly started program. So, if you open a command window, type "svn" and get the "not found" error, then edit the path in the dialog descvribed above and try again, nothing will happen.

This is because the command window is working using its copy of the environment, which it got when it was started. So, after you change the environment variables, open a new command window and it should work.

萝莉病 2024-07-29 05:26:43

您的 PATH 中可能没有 ...\subversion\bin 。

You probably don't have ...\subversion\bin in your PATH.

娇柔作态 2024-07-29 05:26:43

您需要将该文件夹添加到路径中:

右键单击“我的电脑”>“ 属性> 高级> 环境变量

并编辑 Path 属性以包含 program files\subversion\bin

You need to add that folder to the path:

Right click My Computer > Properties > Advanced > Environment Variables

and edit the Path property to include program files\subversion\bin

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文