SamKirkland / FTP-Deploy-Action

Deploys a GitHub project to a FTP server using GitHub actions
MIT License
3.92k stars 374 forks source link

TLS security issue #234

Open toledox82 opened 3 years ago

toledox82 commented 3 years ago

Bug Description I having issue with cPanel TLS security for FTP connection.

My Action Config

on: push
name: 🚀 Deploy website on push
jobs:
  web-deploy:
    name: 🎉 Deploy
    runs-on: ubuntu-latest
    steps:
    - name: 🚚 Get latest code
      uses: actions/checkout@v2

    - name: 📂 Sync files
      uses: SamKirkland/FTP-Deploy-Action@4.1.0
      with:
        server: ${{ secrets.FTP_SERVER }}
        username: ${{ secrets.FTP_USERNAME }}
        password: ${{ secrets.FTP_PASSWORD }}
        security: strict

My Action Log

FTPError: 421-Sorry, cleartext sessions and weak ciphers are not accepted on this server.
421 Please reconnect using TLS security mechanisms.
    at FTPContext._onControlSocketData (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3945:39)
    at Socket.<anonymous> (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.1.0/dist/index.js:3786:44)
    at Socket.emit (events.js:210:5)
    at addChunk (_stream_readable.js:309:12)
    at readableAddChunk (_stream_readable.js:286:13)
    at Socket.Readable.push (_stream_readable.js:224:10)
    at TCP.onStreamRead (internal/stream_base_commons.js:182:23) {
  name: 'FTPError',
  code: 421
}
Error: FTPError: 421-Sorry, cleartext sessions and weak ciphers are not accepted on this server.
421 Please reconnect using TLS security mechanisms.
Dandix3 commented 2 years ago

i have the same problem. Did u solve it ?

renehamburger commented 2 years ago

@toledox82, did you try protocol: ftps or protocol: ftps-legacy?

shamimbdpro commented 2 years ago

image Same Issue for me

samfrank commented 2 years ago

Adding protocol: ftps and security: loose worked for me to solve the same issue

iyinusa commented 2 years ago

Adding protocol: ftps only works for me.

saifulsaif commented 1 year ago

where I should added protocol: ftps I have still the issue

saifulsaif commented 1 year ago

where should add them? please help I have same issue

awsajidhussain commented 1 year ago

Put ftps in the following manner

...
with:
        server: ${{ secrets.FTP_SERVER }}
        username: ${{ secrets.FTP_USERNAME }}
        password: ${{ secrets.FTP_PASSWORD }}
        protocol: ftps
saifulsaif commented 1 year ago

Still not working. Show this error. [image: image.png]

On Mon, Jul 10, 2023 at 1:27 PM Sajid Hussain @.***> wrote:

Put ftps in the following manner

... with: server: ${{ secrets.FTP_SERVER }} username: ${{ secrets.FTP_USERNAME }} password: ${{ secrets.FTP_PASSWORD }} protocol: ftps

— Reply to this email directly, view it on GitHub https://github.com/SamKirkland/FTP-Deploy-Action/issues/234#issuecomment-1628390737, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFPDWK732AR3UUVBCO4WZRLXPOVF3ANCNFSM5GNDXPFQ . You are receiving this because you commented.Message ID: @.***>

smruti12346 commented 1 year ago

Put ftps in the following manner

...
with:
        server: ${{ secrets.FTP_SERVER }}
        username: ${{ secrets.FTP_USERNAME }}
        password: ${{ secrets.FTP_PASSWORD }}
        protocol: ftps

Its working for me

aliexalter commented 3 months ago

I have TLS 1.2 enabled on windows 2012 server both client and server keys in registery. I am getting error

Error: Client is closed
    at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4719:29
    at new Promise (<anonymous>)
    at FTPContext.handle (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4699:16)
    at Client.sendIgnoringError (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:3747:25)
    at Client._openDir (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4265:20)
    at Client.ensureDir (/home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:4256:24)
    at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:3076:121
    at Generator.next (<anonymous>)
    at /home/runner/work/_actions/SamKirkland/FTP-Deploy-Action/4.3.0/dist/index.js:3061:71
    at new Promise (<anonymous>)
Closing reason: Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:218:20) {
  code: 'ECONNRESET'

and on server I get Event Log with Error sourcing Schannel

A fatal alert was generated and sent to the remote endpoint. This may result in termination of the connection. The TLS protocol defined fatal error code is 40. The Windows SChannel error state is 1205

An TLS 1.2 connection request was received from a remote client application, but none of the cipher suites supported by the client application are supported by the server. The SSL connection request has failed.

These errors only appear with this Github Action, FTP like FileZilla are working on FTPS properly.