修改SVN密码命令行
如何从命令行更改 SVN 密码?
如果可以从命令行完成,这对我来说是最好的方法。
How do I change the SVN password from command line?
It is the best way for me if it can be done from the command line.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
在 Subversion 上设置密码的方法有多种。这取决于您使用的服务器(svnserve、http、svn+ssh)以及管理员设置一切的方式。
Subversion 不包含内置的身份验证方法。相反,它可以使用许多不同的外部身份验证方法,从非常简单到极其复杂。有些将允许用户更改自己的密码,甚至设置自己的帐户。其他则需要系统管理员来完成。这完全取决于您的特定设置。
svn co http://server/src/repos
)。我已将其设置为使用 Windows Active Directory,因此用户的用户名和密码是其 Windows 用户名和密码。这意味着我不必处理用户的我忘记了密码请求,并将整个帐户问题交给我们的 Windows 管理员。htpasswd
,其位置由 Subversion 管理员配置。系统管理员可能有办法让用户设置自己的密码,但这不一定是真的。在这种情况下,您必须联系管理员并要求他们更改您的密码。config
目录中有一个passwd
文件。它位于运行服务器的系统上,您无权访问它。同样,您必须联系系统管理员。因此,您必须询问 Subversion 管理员如何更改您的密码。如果幸运的话,还有一种方法可以自己做。如果不是,您必须要求 Subversion 管理员进行更改。
There are multiple ways passwords are setup on Subversion. It depends upon the server you're using (svnserve, http, svn+ssh), and the way the administrator has set everything up.
Subversion doesn't contain a built in authentication method. Instead, it can use many different external authentication methods from the very simple to the extremely complex. Some will allow users to change their own passwords and even setup their own accounts. Others require a system administrator to do it. It all depends upon your particular setup.
svn co http://server/src/repos
). I've set it up to use our Windows Active Directory, so the user's username and password is their Windows' username and password. It means I don't have to handle users' I forgot my password requests, and passed the whole account headache to our Windows administrators.htpasswd
and its location is configured by the Subversion administrator. It's possible that the System administrator has a way to let the users set their own passwords, but that's not necessarily true. In this instance, you have to contact the administrator and ask them to change your password.svnserve
(svn co svn://server/repos
). The standard way this is setup is that there's apasswd
file in the Subversion repository'sconfig
directory. This is located on the system that's running the server, and you have no access to it. Again, you have to contact the system administrator.So, you're going to have to ask your Subversion administrator how to change your password. If you're lucky, there's a way to do it yourself. If not, you'll have to ask your Subversion administrator to change it.
您必须使用命令行编辑器编辑
/repo/conf/passwd
下的文件,例如 Vim。使用
svnadmin
等 Subversion 命令行实用程序无法做到这一点。You must edit a file under your
/repo/conf/passwd
using a command line editor like Vim.There is no way to do this with Subversion command-line utilities like
svnadmin
.如果使用https,则密码可能由 Apache 定义。这就是我更改密码所需执行的操作,以防对其他人有帮助:
然后使用 https 进行结账,以验证是否更改了正确的密码。
If https is used, the password may be defined by Apache. This is what I needed to do to change password, in case it helps someone else:
Then do checkout with https to verify the right password got changed.
这就是我必须做的:
备份当前的 svn-auth 以防万一
它要求新的密码
This is what I have to do:
backup current svn-auth just in case
It was ask for new passwsord
htpasswd -m C:\csvn\data\conf\svn_auth_file admin
htpasswd -m C:\csvn\data\conf\svn_auth_file admin
我建议安装 Collabnet SubVersion Edge 捆绑包,因为它包含一个允许用户自行更改密码的 Web 工具。
I recommend installing the Collabnet SubVersion Edge bundle, since it includes a Web tool for allowing users to change their passwords on their own.