コードを Nexus リポジトリ リポジトリからチェックアウトしました。アカウントのパスワードを変更し、settings.xml
ファイル内で正しく設定しました。実行中に、そのリポジトリからファイルをダウンロードしようとするとmvn install clean
エラーが発生します。Not authorized, ReasonPhrase:Unauthorized
このエラーを解決する方法はありますか? Maven 3.04 で Windows 7 を使用しています
コードを Nexus リポジトリ リポジトリからチェックアウトしました。アカウントのパスワードを変更し、settings.xml
ファイル内で正しく設定しました。実行中に、そのリポジトリからファイルをダウンロードしようとするとmvn install clean
エラーが発生します。Not authorized, ReasonPhrase:Unauthorized
このエラーを解決する方法はありますか? Maven 3.04 で Windows 7 を使用しています
この問題は、リモート リポジトリから依存関係を取得しているときに発生する可能性があります。私の場合、リポジトリは認証を必要とせず、settings.xml ファイルのサーバー セクションを削除することで解決されました。
<servers>
<server>
<id>SomeRepo</id>
<username>SomeUN</username>
<password>SomePW</password>
</server>
</servers>
ps: あなたのターゲットはmaven install cleanではなくmvn clean installだと思います
I have recently encountered this problem. Here are the steps to resolve
<servers>
<server>
<id>serverId</id>
<username>username</username>
<password>password</password>
</server>
</servers>
<repositories>
<repository>
<id>serverId</id>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<profiles>
<profile>
<repositories>
<repository>
<id>serverId</id>
<name>aliyun</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
</repository>
</repositories>
</profile>
</profiles>
Note that you should ensure that the id of the server tag should be the same as the id of the repository tag.
ここでの問題は、使用されているパスワードのタイプミスでした。これは、パスワードに使用されている文字/文字が原因で簡単に識別できませんでした。