Publish over FTP发布报错

简介

Publish over FTP是Jenkins中用于FTP传输文件的插件。

报错:Could not create or change to directory

在这里插入图片描述
这个是因为不支持中文目录。
虽然Jenkins说明中推荐中文配置为GB2312,但其实我们一般通用的作法是设置为UTF-8,兼容各类操作系统和构建环境。

处理

在这里插入图片描述

【系统管理】->【系统设置】->【Publish over FTP】->高级:【Control encoding】->输入【UTF-8】或者【GB2312】

报错:Could not write file

在这里插入图片描述
不支持FTP被动模式(PASV)
一种是在FTP服务端开启PASV被动模式(一般默认两种模式都开启了,但不排除没有开启的情况,就导致这个问题)

另一种方式就是改变Jenkins的连接模式,通过官网也能找到这一段话:

Use active data mode
By default passive mode will be used to connect to the FTP Server.
In passive mode the client initiates all connections which will allow the client to send files through a firewall that has been configured to refuse all inbound connections (and does not create dynamic rules).
If you want to dissable passive mode, and have the client use PORT commands for the server to connect to the client to retieve the files, then you can check this box.

解决

在这里插入图片描述

【系统管理】->【系统设置】->【Publish over FTP】->高级:勾选【Use active data mode】

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值