Comments (3)
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.
Yes, that's exactly why I opened this issue
from sftp-deploy-action.
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)
- Every deploy is slow HOT 3
- syntax error on line 7
- Create remote_path directory if not exists HOT 1
- What about exclude feature? HOT 3
- Connection closed HOT 8
- tree 跟 stat 都顯示存在,怎麼它就偵測不到呢? HOT 3
- Is it possible to deploy only the changed files since the last deployment? HOT 1
- Permanently added '***' (ECDSA) to the list of known hosts. HOT 1
- Push only changes or new files from last commit?
- Connection is interrupted with an error
- exec request failed on channel 0 HOT 3
- Upload only changed file only HOT 1
- Create a new issue HOT 1
- `delete_remote_files` removes the entire folder, not "all files in the remote path" as documented HOT 1
- local_path: No such file or directory
- how to use password for encrypted private keys?
- Load key "../private_key.pem": invalid format ED25519? HOT 2
- What should be used for 'remote_path' to reference current remote directory? HOT 1
- exec request failed on channel 0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sftp-deploy-action.