Transfer failed for https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-resour

1丶问题分析

gitlab 容器内部 mvn install 出错 一开始我还以为是远程仓库的url不行 于是疯狂修改settings.xml 结果还是不行,

然后猜测可能是容器内部没有网 ,百度 修改dns 配置 

vi /etc/resolv.conf
nameserver 114.114.114.114

重启容器 后发现 /etc/resolv.conf  没修改到 还原了

再次百度 发现可以通过修改docker 的配置文件 /etc/docker/daemon.json  来指定容器的DNS配置 

Transfer failed for https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-resour

2丶解决方案  

vi /etc/docker/daemon.json
{
"dns" : [
"114.114.114.114",
"8.8.8.8"
]
}

Transfer failed for https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-resour

 重启Docker

sudo service docker restart

3丶SUCCESS

Transfer failed for https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-resour

 

 

 

Transfer failed for https://maven.aliyun.com/repository/public/org/apache/maven/plugins/maven-resour

上一篇:Kubernetes K8S之Helm部署ELK日志分析系统


下一篇:nginx开启日志,指定格式,查看执行时间