gitlab runner CI/CD 流水线执行报错: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilder
时间: 2023-12-21 07:31:29 浏览: 54
根据提供的引用内容,你遇到的问题是在执行gitlab runner CI/CD流水线时出现了错误:PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilder。这个错误通常是由于SSL证书验证失败导致的。以下是两种解决方案:
1. 在单个项目中解决问题:
在项目的settings -> Maven -> runner -> vmoption中添加以下命令:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
然后清除IDEA所有缓存,再次运行代码。
2. 在全局设置中解决问题:
如果想要永久生效,需要更改当前IDEA的全局设置。设置vmoption为:
-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true
相关问题
base_url: https://api.weixin.qq.com 报错:E httprunner.exceptions.ParamsError: base url missed!
这个错误提示是因为在执行接口请求时没有设置正确的 base_url。你需要在请求中设置正确的 base_url,比如:
```yaml
- name: test API
request:
url: /path/to/api
method: GET
base_url: https://api.weixin.qq.com
```
或者在配置文件中设置全局的 base_url:
```yaml
config:
name: My Test Config
variables:
base_url: https://api.weixin.qq.com
testcases:
- name: test API
request:
url: /path/to/api
method: GET
base_url: $base_url
```
请检查你的请求是否正确设置了 base_url,如果还有问题,请提供更多的信息,以便我能够更好地帮助你。
gitlab的ci/cd怎么使用
要使用GitLab的CI/CD功能,你可以按照以下步骤进行操作:
1. 首先,确保你已经安装了GitLab Runner。你可以使用以下命令来安装GitLab Runner:
```
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash
sudo yum install gitlab-runner
```
如果你在Ubuntu系统上使用,请使用`apt-get`命令来安装。
2. 安装完成后,你可以使用`gitlab-runner -v`命令来验证安装是否成功,并查看GitLab Runner的版本号。
3. 接下来,你需要将GitLab Runner注册到GitLab CI/CD Coordinator上。在终端中输入以下命令:
```
gitlab-runner register
```
在提示中,你需要提供GitLab CI/CD Coordinator的URL(例如https://gitlab.com/),以及访问权限验证的Token。
4. 注册成功后,你可以配置`.gitlab-ci.yml`文件来定义CI/CD的流程。这个文件包含了一系列的任务(jobs)和阶段(stages),你可以根据自己的项目需求进行配置。具体的语法和配置参考可以在GitLab官方文档中找到。
5. 当你的代码提交到GitLab仓库时,GitLab CI/CD会自动触发流水线(pipeline)的执行。流水线中的任务会按照`.gitlab-ci.yml`文件中定义的顺序和规则进行执行。
总结:要使用GitLab的CI/CD功能,你需要先安装GitLab Runner,并将其注册到GitLab CI/CD Coordinator上。然后,在项目中配置`.gitlab-ci.yml`文件来定义CI/CD流程。最后,当代码提交到GitLab仓库时,GitLab CI/CD会自动执行流水线中的任务。详细的使用方法和配置参考可以查阅GitLab官方文档。
相关推荐
![java](https://img-home.csdnimg.cn/images/20210720083646.png)
![jar](https://img-home.csdnimg.cn/images/20210720083455.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)