命令行 SVN 忽略提供的凭据并使用 windows 用户代替

Command line SVN ignores provided credentials and uses windows user instead

我正在尝试通过命令行将一些文件导入我的 SVN:

 svn import -m "message" "mypath" "https://mysvn" --username "user" --password "password"

我面临的问题是提供的凭据被完全忽略,取而代之的是我的 windows 用户在 SVN 上进行身份验证。所以导入成功,但 SVN 历史提到我的 Windows 用户作为作者,而不是我通过命令行提供的用户。

有人熟悉这个问题吗?有没有办法在用于导入的命令中获取凭据而不是 windows 用户?

提前致谢!

如果您想使用其他用户帐户,我只能猜测您的服务器正在使用 AD Single Sign-On and therefore you are getting authenticated under your user account's credentials. Enter another account's credentials to Windows Credential Manager

这已在主题中得到解答: In SVN how do I override automatic Windows domain authentication

因此,在您的情况下,使用命令行

svn import -m "message" "mypath" "https://mysvn" --username "user" --password "password" --config-option servers:global:http-auth-types=basic;digest

应该完成这项工作。