jenkins-pipeline - Nexus:上传文件时连接超时
问题描述
使用 jenkins 管道脚本将 .tgz 文件上传到 nexus 时出现错误。
在我的管道脚本中使用舞台作为
stage('上传 tar 文件到 nexus') { steps { sh """ curl -f -v $NEXUS --upload-file partnerPortal-* http://localhost:8080/repository/partnerFrontEnd-test/partnerPortal-date +"%d-%m-%Y-%H.%M"
.tgz """ } }
注意:我在同一台服务器上有 jenkins 和 nexus。我的主机文件有 127.0.0.1 localhost
解决方案
将 -u 添加到 curl 命令后,解决了我的问题。
curl -f -v -u $NEXUS --upload-file customerPortal-* https://localhost:8081/-date +"%d-%m-%Y-%H.%M"
.tar.gz
推荐阅读
- mongodb - 尝试配置 AWS Documentdb 但它返回超时
- java - 基于链表数组的实现 - 打印方法未编译
- crystal-reports - Crystal Report 的报表查看器“此处应有声明”
- python - 用第二个数组的两个值替换数组的数据
- python - 将字符偏移量转换为字偏移量的最简单方法
- flutter - Flutter 1.22.0 IOS 应用连接丢失问题
- javascript - React JS音频不播放
- java - 在 JavaFx Webview 中打开 html 页面时,线程睡眠不起作用
- r - 将函数应用于R中嵌套列表的某些元素
- angular - 搜索表格