- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试从 Nexus 存储库中查看我的代码。
首先,我已经生成了密码
mvn --encrypt-master-password _mypassword_
<settingsSecurity>
<master>{TnRCVc3cX6MH5qRXEMLwxjKGfXQu6v/6wR0rgHED2ws=}</master>
</settingsSecurity>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
license agreements. See the NOTICE file distributed with this work for additional
information regarding copyright ownership. The ASF licenses this file to
you under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of
the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
by applicable law or agreed to in writing, software distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License. -->
<!-- http://maven.apache.org/settings.html -->
<settings xmlns="http://maven.apache.org/settings/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>C:/Users/joanet/.m2/repository</localRepository>
<proxies>
<proxy>
<id>optional</id>
<active>true</active>
<protocol>http</protocol>
<username>joanet</username>
<password>{TnRCVc3cX6MH5qRXEMLwxjKGfXQu6v/6wR0rgHED5ws=}</password>
<host>157.129.133.11</host>
<port>8032</port>
<nonProxyHosts>localhost</nonProxyHosts>
</proxy>
</proxies>
<servers>
<server>
<id>ecPublicRepository</id>
<username>joanet</username>
<password>{TnRCVc3cX6MH5qRXEMLwxjKGfXQu6v/6wR0rgHED5ws=}</password>
</server>
</servers>
<mirrors></mirrors>
<pluginGroups>
<!-- pluginGroup Specifies a further group identifier to use for plugin lookup. -->
<pluginGroup>com.oracle.weblogic</pluginGroup>
<pluginGroup>com.github.searls</pluginGroup>
<pluginGroup>com.cj.jshintmojo</pluginGroup>
<pluginGroup>com.github.phasebash</pluginGroup>
</pluginGroups>
<profiles>
<profile>
<id>activeProfile</id>
<repositories>
<repository>
<id>ecPublicRepository</id>
<url>https://foo.com/nexus/content/groups/public/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>PublicRepository</id>
<name>Public Repository</name>
<url>https://foo.com/nexus/content/groups/public/</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<!-- activeProfiles | List of profiles that are active for all builds. | -->
<activeProfiles>
<activeProfile>activeProfile</activeProfile>
</activeProfiles>
</settings>
Caused by: org.sonatype.aether.resolution.ArtifactResolutionException: Could not
transfer artifact org.apache.maven.plugins:maven-install-plugin:pom:2.3.1 from/
to ecPublicRepository (https://foo.com/nexus/content/groups/public/): Not authorized , ReasonPhrase:Unauthorized.
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolve(Def
aultArtifactResolver.java:538)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
facts(DefaultArtifactResolver.java:216)
at org.sonatype.aether.impl.internal.DefaultArtifactResolver.resolveArti
fact(DefaultArtifactResolver.java:193)
at org.apache.maven.repository.internal.DefaultArtifactDescriptorReader.
loadPom(DefaultArtifactDescriptorReader.java:281)
... 28 more
最佳答案
加密主密码后,还应加密 nexus 所需的实际密码。所以 settings-security.xml
中的哈希值应该与您在服务器配置中使用的实际值不同。
您可以按照以下步骤操作(取自 here):
Use the following command line:
mvn --encrypt-master-password <password>
Note: Since Maven 3.2.1 the password is an optional argument. If not provided, Maven will prompt for the password. Earlier versions of Maven will not prompt for a password, so it must be typed on the command-line in plaintext. See Tips below for more information.
This command will produce an encrypted version of the password, something like
{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}
Store this password in the ~/.m2/settings-security.xml; it should look like
<settingsSecurity>
<master>{jSMOWnoPFgsHVpMvz5VrIt5kRbzGpI8u+9EF1iFQyJQ=}</master>
</settingsSecurity>When this is done, you can start encrypting existing server passwords. How to encrypt server passwords
You will have to use the following command line:
mvn --encrypt-password <password>
Note:Just like --encrypt-master-password the password argument is optional since Maven 3.2.1.
This command will produce an encrypted version of it, something like
{COQLCE6DU6GtcS5P=}
Cut-n-paste it into your settings.xml file in the server section. This will look like:
<settings>
...
<servers>
...
<server>
<id>my.server</id>
<username>foo</username>
<password>{COQLCE6DU6GtcS5P=}</password>
</server>
...
</servers>
...
</settings>Please note that password can contain any information outside of the curly brackets, so that the following will still work:
关于Maven 未授权,ReasonPhrase :Unauthorized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32119545/
我正在尝试从 Nexus 存储库中查看我的代码。 首先,我已经生成了密码 mvn --encrypt-master-password _mypassword_ 这是我的 c:/Users/joanet
我有一个 AngularJS Web 应用程序,我在其中使用基本身份验证。这很有效,但是当用户输入错误的电子邮件或密码时,我想给他们一个好的错误消息。因此,我返回 401 并带有如下解释的原因短语:h
我有这个代码: public void Put(int id, DistributionRuleModelListItem model) { CommonResultModel pre = n
我最近注意到许多用户正在收到此 IllegalStateException ,这会导致应用程序崩溃。它发生在 WebView向用户显示: Fatal Exception: java.lang.Ille
我的设置 我有 2 个 WebApi 项目,流程如下: 用户向API 1发出请求 API 1 代表用户向 API 2 发出请求(使用 HttpClient)。 using (var client =
我是部署 Maven 项目的新手,我认为我遇到了与 Failed to deploy artifacts 中描述的完全相同的问题。 但该帖子中的答案对我的情况没有帮助。 完整的错误堆栈跟踪如下所示。我
我在 JCenter (oss.jfrog.org) 中部署了一个 artificact,尽管部署没有在没有错误的情况下结束(请参阅 Deploy SNAPSHOT to oss.jfrog.org
这个问题已经有答案了: Maven dependencies are failing with a 501 error (28 个回答) 已关闭 3 年前。 使用maven构建Java项目时出错 [E
使用org.apache.http与 org.apache.httpcomponents httpclient 4.5.2 描述端点上的 swagger 配置(不过,这不仅仅是库
我在 pom.xml 文件中添加了以下依赖: org.tuckey urlrewritefilter 4.0.4 我有很多 Maven 依赖项,但是当我添加上面的依赖项时,我得到: F
Failed to execute goal on project lcms.web: Could not resolve dependencies for project lcms:lcms
http://numberformat.wordpress.com/2011/05/18/nexus-repository/ 我正在按照上面的链接设置 Maven 和 Nexus,一切都是新的。我无法
好的,我有版本 x.y.z 的工件版本,我想自动重新部署它而不更改其版本(我无法更改版本!)。 工件分为三个分别生成的jar。所以我有: 工件 GUI Artifact 核心 32 位 Artifac
我在使用 maven-deploy-plugin 时遇到了一个奇怪的错误 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-d
我尝试发送这两个请求,但我只收到标题中列出的错误作为响应。我对谷歌服务器的两个网络请求是这样的: HttpClient http = new HttpClient(); HttpResponseMes
我正在尝试做 mvn clean package tomcat7:deploy但我总是收到此错误:tomcatManager status code:403, ReasonPhrase:Forbbid
我使用 Web api 自己的主机: public class TestController : ApiController { [HttpPost] public void Test
在我们项目的持续集成系统 (travis-ci.org) 中,我开始出现错误: [ERROR] Failed to execute goal org.codehaus.cargo:cargo-mave
我在 this topic 创建 Spring 配置时遇到问题 现在我正在尝试使用 tomcat7-maven-plugin 将我的 war 文件从 IntelliJ IDEA 部署到 tomcat
我正在为 Maven 项目编译我的存储库。我收到一些依赖性错误。 我知道 Maven 中央存储库不再支持通过纯 HTTP 进行的不安全通信,并且要求对存储库的所有请求都通过 HTTPS 进行加密。。这
我是一名优秀的程序员,十分优秀!