jenkins 码云 自动化部署补充填坑

官网文档说明 https://gitee.com/help/articles/4193#article-header2

注意: 个人补充填坑

一. 添加码云链接配置

1. 域名url填写https://gitee.com在这里插入图片描述
2. 证书令牌问题
  1. 选择 Gitee API 令牌
    -
  2. Gitee APIV5 私人令牌值 需要 跳转 https://gitee.com/profile/personal_access_tokens获取
    在这里插入图片描述
3.源码管理
  • 此处Credentials Add 选择 username with password ,输入 码云 账号密码即可
  • 但需要在服务器生成ssh秘钥 ,然后将公钥,复制到gitee上的ssh管理进行添加,否则Permission denied (publickey).
    在这里插入图片描述
4. 服务要需要检查 git 是否安装,否则部署报错 找不到git
yum -y install git
5. Vue部署需要安装nodenpm

Linux服务器 安装node、npm及gulp

6. 报错

ERROR: Exception when publishing, exception message [Failed to connect and initialize SSH connection. Message: [Failed to connect session for config [121.89.211.94]. Message [Auth fail]]] Build step 'Send build artifacts over SSH' changed build result to UNSTABLE Finished: UNSTABLE

  • 原因: 服务器配置有问题
  • 解决办法:jenkins - 配置 -SSH Servers ,修改密码 点击 Test Configuration,返回success即可
  • 在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/m0_37285193/article/details/107207571