Received status code 401 from server: Unauthorized using Maven
还没有人认领这个 Issue。
- 主要语言
- Java
- 星标
- 438
- 派生
- 117
- PR 合并指标
- 30 天内没有已合并 PR
描述
Hi there,
I'm trying to build a project using mapbox sdk in JavaFX. If I try to build I'm getting the following error:
[ERROR] Failed to execute goal on project interfaces: Could not resolve dependencies for project testProject:interfaces:bundle:1.0.0-SNAPSHOT: Failed to collect dependencies at com.mapbox.mapboxsdk:mapbox-sdk-services:jar:6.15.0: Failed to read artifact descriptor for com.mapbox.mapboxsdk:mapbox-sdk-services:jar:6.15.0: Could not transfer artifact com.mapbox.mapboxsdk:mapbox-sdk-services:pom:6.15.0 from/to mapbox (https://api.mapbox.com/downloads/v2/releases/maven): authentication failed for https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-services/6.15.0/mapbox-sdk-services-6.15.0.pom, status: 401 Unauthorized
My settings.xml:
`
<server>
<id>mapbox</id>
<username>mapbox</username>
<password>Token with Downloads:READ property</password>
</server>
</servers>`
and
<repository>
<id>mapbox</id>
<name>Mapbox repo</name>
<url>https://api.mapbox.com/downloads/v2/releases/maven</url>
</repository>
and finally POM.xml:
<dependency>
<groupId>com.mapbox.mapboxsdk</groupId>
<artifactId>mapbox-sdk-services</artifactId>
<version>6.15.0</version>
</dependency>
I also tried to use the following adress and succeeded to read the POM
https://api.mapbox.com/downloads/v2/releases/maven/com/mapbox/mapboxsdk/mapbox-sdk-services/6.15.0/mapbox-sdk-services-6.15.0.pom?access_token=MYTOKEN
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
先检查报告中的 settings.xml、repository 声明和 POM 依赖项,然后使用 Mapbox repository URL 重现 Maven 构建。检查 server id 和身份验证配置是否符合 Maven 对 401 响应的预期。mapbox-sdk-services 6.15.0 依赖项能够成功解析且没有 unauthorized 错误时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- java
- 领域
- build-system
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100