Coder Social home page Coder Social logo

Comments (3)

satriahrh avatar satriahrh commented on August 17, 2024

Is it possible that your server only accepting sftp connection? From what I see here, deleting remote files requires ssh access.

https://github.com/wlixcc/SFTP-Deploy-Action/blob/master/entrypoint.sh#L47-L58

# delete remote files if needed
if test $9 == "true";then
  echo 'Start delete remote files'
  ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 rm -rf $6
fi


if test $7 = "true"; then
  echo "Connection via sftp protocol only, skip the command to create a directory"
else
  echo 'Create directory if needed'
  ssh -o StrictHostKeyChecking=no -p $3 -i $TEMP_SSH_PRIVATE_KEY_FILE $1@$2 mkdir -p $6
fi

from sftp-deploy-action.

SimonIT avatar SimonIT commented on August 17, 2024

Yes, that's exactly why I opened this issue

from sftp-deploy-action.

mvoggenreiter avatar mvoggenreiter commented on August 17, 2024

I have the same problem. I only have sftp access but no ssh access to the target server.
Anyway, I think the issue is more severe, if delete_remote_files=true and sftp_only=true because the first command checks only if we want to delete the directory, but the second one won't be executed at all. In my opinion, the first command has to check for sftp_only as well.

from sftp-deploy-action.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.