我正在尝试在Bitbucket云中创建管道,以使用git-ftp将Swagger文件放入FTP服务器。这是我的代码:
image: madshansen/docker-git-ftp:latest
pipelines:
custom: # Pipelines that are triggered manually via the Bitbucket GUI
init: # -- First time init
- step:
script:
- git ftp init -vv -u 'user' -p 'pass' ftp://myftp.com/swagger/ --force
deploy-all:
- step:
script:
- git ftp push -vv -u "user" -p "pass" ftp://myftp.com/swagger/ --all
但是当我尝试运行init时,出现此错误:
+ git ftp init -vv -u 'user' -p 'pass' ftp://myftp.com/swagger/ --force --
insecure
Mon Mar 18 21:49:31 UTC 2019: git-ftp version 1.3.3 running on Linux
eb3b54a3-d844-4baf-aa05-f869bd4db180 4.19.23-coreos-r1 #1 SMP Mon Feb 25
23:40:01 -00 2019 x86_64 x86_64 x86_64 GNU/Linux
Mon Mar 18 21:49:31 UTC 2019: Forced mode enabled.
Mon Mar 18 21:49:31 UTC 2019: Insecure SSL/TLS connection allowed
Mon Mar 18 21:49:32 UTC 2019: Host is 'myftp.com'.
Mon Mar 18 21:49:32 UTC 2019: User is 'bitbucket'.
Mon Mar 18 21:49:32 UTC 2019: Password is set.
Mon Mar 18 21:49:32 UTC 2019: Path is 'swagger/'.
Mon Mar 18 21:49:32 UTC 2019: Syncroot is ''.
Mon Mar 18 21:49:32 UTC 2019: The remote sha1 is saved in file '.git-
ftp.log'.
Mon Mar 18 21:49:32 UTC 2019: CACert is ''.
Mon Mar 18 21:49:32 UTC 2019: Insecure is '1'.
Mon Mar 18 21:49:32 UTC 2019: Check if ftp://user:***@myftp.com is
accessible.
* Trying 88.86.120.88...
* TCP_NODELAY set
* Connected to myftp.com (88.86.120.88) port 21 (#0)
< 220 server ready - login please
> USER user
< 331 password required
> PASS pass
* response reading failed
* Closing connection 0
curl: (56) response reading failed
Mon Mar 18 21:49:32 UTC 2019: fatal: Can't access remote
'ftp://user:***@myftp.com', exiting...
奇怪的是,当我在PC上的bash中运行init命令时,它可以工作。我在哪里做错了?