eclipse Maven svn: E215004: 认证失败,交互提示被禁用;查看 --force-interactive 选项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25856735/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Maven svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
提问by user1623627
When I try to do a mvn release: perform
, I get this error
当我尝试执行 a 时mvn release: perform
,出现此错误
[ERROR] Provider message:
[ERROR] The svn command failed.
[ERROR] Command output:
[ERROR] svn: E215004: Authentication failed and interactive prompting is disabled; see the --force-interactive option
svn: E215004: Commit failed (details follow):
svn: E215004: No more credentials or we tried too many times.
Authentication failed
svn: E215004: Additional errors:
svn: E215004: No more credentials or we tried too many times.
Authentication failed
So I thought something maybe wrong with my pom. So I tried doing
所以我想我的 pom 可能有问题。所以我试着做
mvn scm:checkin -Dmessage="relase" -Dusername=<username> -Dpassword=<password>.
I have the scm related section in pom in this manner:
我以这种方式在 pom 中有与 scm 相关的部分:
<scm>
<url>url</url>
<connection>scm:svn:url</connection>
<developerConnection>scm:svn:url</developerConnection>
</scm>
But I still get the same error.
但我仍然得到同样的错误。
I have subclipse installed in eclipse. I have collabnet and tortoise SVN installed on my machine. All are 1.8.1 version. When I try to checkin directly from eclipse using Team--> Commit, I am able to commit using the same credentials. Also I am able to commit using the same credentials from TortoiseSVN. But using the same credentials I am not able to release perform or scm checkin from maven. I saw some links which talk about ${user.home}.scm\svn-settings.xml where we can configure interactive svn. But I do not see it on my machine. I do not see the .scm folder itself. Am I doing anything wrong here?
我在 eclipse 中安装了 subclipse。我的机器上安装了 collabnet 和 tortoise SVN。都是1.8.1版本。当我尝试使用 Team--> Commit 直接从 Eclipse 签入时,我能够使用相同的凭据进行提交。此外,我可以使用来自 TortoiseSVN 的相同凭据进行提交。但是使用相同的凭据,我无法从 maven 中释放 perform 或 scm checkin。我看到了一些关于 ${user.home}.scm\svn-settings.xml 的链接,我们可以在其中配置交互式 svn。但是我在我的机器上看不到它。我没有看到 .scm 文件夹本身。我在这里做错了什么吗?
These are software that I installed in eclipse
这些是我在eclipse中安装的软件
Collabnet merge client -4.0.2 Subclipse- 1.10.4 Subclipse client adapter -1.10.1 Subversion JavaHL native library adapter- 1.8.8.1
Collabnet 合并客户端 -4.0.2 Subclipse- 1.10.4 Subclipse 客户端适配器 -1.10.1 Subversion JavaHL 本地库适配器 - 1.8.8.1
回答by user944849
The only place I've seen this documented is in the Maven release plugin FAQ. You may add a server
entry to your POM, then configure the project to use it.
我在 Maven 发布插件常见问题解答中看到了这个记录的唯一地方。您可以server
向 POM添加一个条目,然后配置项目以使用它。
<!-- Project POM, or a corporate parent -->
<properties>
<project.scm.id>my-scm-server<project.scm.id>
</properties>
<!-- User's settings.xml file -->
<server>
<id>my-scm-server</id>
<username>username</username>
<password>password</password> <!-- encrypted I hope! -->
</server>
I can't find the reference for this (maybe I looked at the source code), but once upon a time I discovered that if you set the ID to the Subversion host, then the server info will be located by many plugins, including release and scm. It would look like this:
我找不到这方面的参考(也许我看过源代码),但曾几何时我发现如果将 ID 设置为 Subversion 主机,那么服务器信息将被许多插件定位,包括发布和scm。它看起来像这样:
<!-- Project POM, or a corporate parent -->
<properties>
<project.scm.id>your.subversion.host<project.scm.id> <!-- note, no scm:svn part -->
</properties>
<!-- User's settings.xml file -->
<server>
<id>your.subversion.host</id>
<username>username</username>
<password>password</password> <!-- encrypted I hope! -->
</server>
回答by Sebastian
Subversion really changes from 1.6.x to 1.8.x. This problem may be due to that (especially using Windows + Active Directory).
Subversion 真的从 1.6.x 变成了 1.8.x。这个问题可能是由于(特别是使用 Windows + Active Directory)。
If invoking maven from eclipse it then tries to access the SVN not using Subclipse. Assume that you even use an external Maven installation. This external installation does not know your Eclipse / Subclipse and thus calls SVN available on your platform (depending on Windows path variable). This SVN for does not know of your Eclipse and hence has to get the credentials from somewhere else (for example %USER%\AppData\Roaming\Subversion\auth). Unfortunately at this point something seems to have been broken with the maven-release-plugin since SVN protocol version 1.6.
如果从 Eclipse 调用 maven,它会尝试不使用 Subclipse 访问 SVN。假设您甚至使用外部 Maven 安装。此外部安装不知道您的 Eclipse / Subclipse,因此会调用您平台上可用的 SVN(取决于 Windows 路径变量)。此 SVN for 不知道您的 Eclipse,因此必须从其他地方获取凭据(例如 %USER%\AppData\Roaming\Subversion\auth)。不幸的是,自 SVN 协议版本 1.6 以来,maven-release-plugin 似乎已经破坏了这一点。
Currently no best solution is known and it is unclear what exactly causes the maven-release-plugin to fail. The best work around maybe to provide the credentials in the Eclipse Run configuration (JRE tab, then argument Dusername=... -Dpassword=...).
目前尚无最佳解决方案,也不清楚究竟是什么原因导致 maven-release-plugin 失败。最好的解决方法可能是在 Eclipse 运行配置中提供凭据(JRE 选项卡,然后参数 Dusername=... -Dpassword=...)。
I would recommend not to store the credentials somewhere where they might be accidentally exploited to others.
我建议不要将凭据存储在可能会被其他人意外利用的地方。