Gradle下载spring包出现Received status code 401 from server: Unauthorized
大家在下载spring家族源码的时候,在进行gradle构建的时候,会出现y:
Could not GET 'https://repo.spring.io/libs-release/xxxxx'. Received status code 401 from server: Unauthorized
Disable Gradle 'offline mode' and sync project
这个原因是spring从2021.2.21日开始不再支持匿名用户访问/libs-release的目录了。
We will no longer support anonymous download of 3rd-party Maven Central artifacts from repo.spring.io, even if previously cached by an authenticated user. They should be resolved instead from the central servers.
几种解决方法:
如果是/libs-snapshot 或者 /libs-milestone,需要修改为/snapshot 或者 /milestone 。
或者讲repository改为阿里云的仓库地址c
//本地仓库,地址是maven本地仓库路径mavenLocal()//maven私服。此处设置为ali的旧库,地址是urlmaven{ url "http://maven.aliyun.com/nexus/content/groups/public" }//阿里云新库maven { url "https://maven.aliyun.com/repository/central" }maven { url "https://maven.aliyun.com/repository/google" }maven { url "https://maven.aliyun.com/repository/gradle-plugin" }maven { url "https://maven.aliyun.com/repository/jcenter" }maven { url "https://maven.aliyun.com/repository/spring" }maven { url "https://maven.aliyun.com/repository/spring-plugin" }maven { url "https://maven.aliyun.com/repository/public" }maven { url "https://maven.aliyun.com/repository/releases" }maven { url "https://maven.aliyun.com/repository/snapshots" }maven { url "https://maven.aliyun.com/repository/grails-core" }maven { url "https://maven.aliyun.com/repository/mapr-public" }maven { url "https://maven.aliyun.com/repository/apache-snapshots" }
如果阿里云仓库里面没有,IDE还在报401的错误,也就是几乎没有办法下载到依赖的。需要找相关spring家族源码的更高版本。比如:我找的是spring-session2.1.2一直有这个问题,下载2.7.x的源码去变异
试了很多种办法,普通用户没有办法注册repos.spring.io的账号的。所以如果想通过manve中指定账号和密码的方法比较困难。
更多信息详见spring官方文档y:https://spring.io/blog/2020/10/29/notice-of-permissions-changes-to-repo-spring-io-fall-and-winter-2020
Gradle下载spring包出现Received status code 401 from server: Unauthorized相关推荐
- xxx.jar‘. Received status code 401 from server: Unauthorized
目录 背景 解决方案 背景 gradle下载依赖时报一堆的 Received status code 401 from server: Unauthorized问题,具体异常如下所示. <ij_ ...
- Received status code 403 from server: ForbiddenDisable Gradle ‘offline mode‘ and sync project
Could not HEAD 'https://dl.bintray.com/umsdk/release/cn/rongcloud/sdk/im_lib/4.0.3.15/im_lib-4.0.3.1 ...
- Android Received status code 502 from server: Bad Gateway
前言 今天正常上班 因为线上有个机器出现了白屏bug 所以我就远程查看了下问题 发现是一个空指针造成的 但是这个bug我记得我几个月前就改过了 但是还是有这个问题 说明线上机器 运维人员没有更新新的a ...
- Received status code 400 from server: Bad Request
一.报错信息 FAILURE: Build failed with an exception.* What went wrong: A problem occurred configuring roo ...
- Received status code 502 from server: Bad Gateway
第一个问题 报错信息 FAILURE: Build failed with an exception.* What went wrong: Could not determine the depend ...
- Received status code 400 from server: Bad Request解决方案
Received status code 400 from server: Bad Request解决方案 Could not GET ' https://dl.google.com/dl/andro ...
- Received status code 403 from server: Forbidden
解决方案: 在项目的build.gradle里找到http://jcenter.bintray.com/ 然后将http换成https 如果找不到在哪,可以全局搜索http 403是被限制了.只要把前 ...
- Could not GET “XXXXX.xml”Received status code 400
Could not GET "XXXXX.xml"Received status code 400 from seerver :Bad Request 解决方案如下: **×××确 ...
- Android Studio gradle下载依赖包失败的解决办法
Android Studio gradle下载依赖包失败 的解决办法 使用Android Studio在第一次导入项目或者配置完Kotlin后,会一直Build,因为需要下载一些项目中配置的依赖和gr ...
最新文章
- oracle数据库buffer,Oracle数据库导入Buffer不足出现主机蜂鸣
- 地铁进出站是一站怎么办_高铁坐过站?别担心,这样能免费送回
- 隐私计算--联邦学习
- 线上问题分析系列:数据库连接池内存泄漏问题的分析和解决方案
- 使用IDEA基于Maven搭建多模块聚合工程(springmvc+spring+mybatis整合)
- 属于HTML文档头部相关标记,下列选项中,属于HTML文档头部相关标记的是 答案:title/titlemeta /...
- kotlin键值对数组_Kotlin程序以升序对数组进行排序
- cad幕墙下料lisp_石材幕墙屋面不锈钢角钢接闪带施工方法
- 函数式编程 -- 函子(Functor)
- wget ip_全球IP厂商TOP 10排名:后来者虎视眈眈
- SlickEdit完美解析Qt4
- 【论文推荐】推荐4个NLP任务的论文列表 -- 语法纠错、释义生成、文本可读性、汉字部件...
- 火山中文编程 -- 存款本息和
- vue 项目中引入字体文件的正确方式~
- 制作帮助文档的好助手- WORD2CHM WORD2HTML
- 2020年宁夏回族自治区水稻种植分布数据
- LeetCode题目笔记——292. Nim 游戏 (脑筋急转弯C++/Python)
- 【软考 系统架构设计师 简明教程】简介与目录
- 如何将WPS中新建表格下的空白行去掉?
- SpringMVC框架 获取前台传过来的数组并解析