GithubHelp home page GithubHelp logo

serkanyersen / sync Goto Github PK

View Code? Open in Web Editor NEW
311.0 16.0 35.0 180 KB

syncs your local folder with remote folder using scp

License: MIT License

JavaScript 3.07% TypeScript 96.93%
sftp nodejs remote scp ssh ftp sync rsync remote-dev-server cli

sync's People

Contributors

fossabot avatar primigenus avatar serkanyersen avatar sgtpooki avatar tylerfowle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sync's Issues

npm install -g syncjs fails

Error: Cannot find module 'gulp-typescript'
at Function.Module._resolveFilename (module.js:326:15)
at Function.Module._load (module.js:277:25)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)
at Object. (/node_modules/syncjs/gulpfile.js:2:10)
at Module._compile (module.js:398:26)
at Object.Module._extensions..js (module.js:405:10)
at Module.load (module.js:344:32)
at Function.Module._load (module.js:301:12)
at Module.require (module.js:354:17)
at require (internal/module.js:12:17)

3 logins always required

I just stumbled over this tool and it VERY useful. However, there have been a few hiccups.

  1. Whenever a file is changed, the upload requires three logins each time. It does not matter how many changes there are, it always requires three manual password entries when specifying the password in the config. (When I use a key, this issue goes away).
  2. It seems when first starting it, the tool tries to delete old files and succeeds, but then it fails when trying to upload new files. I need to restart syncjs and then it seems to work ok.

I'm running this from a git bash prompt on windows 10

Publish to npm

it should be on npm so that it can be installed globally and run as a script syncjs name is available

Turn it into global script

right now syncjs only works from it's own folder. and can only have single config file. it should however work as a script and run from anywhere with given config file.

Remote CMD and callback feature Request

Do you have any plans to support running build commands on the remote server after a certain file has been uploaded?

For example, I develop locally, sync files to a remote, and then usually run some sort of build command on the remote machine (local builds not possible unfortunately). Allowing me to run a specified command in the folder where the file changed would be excellent. A callback that allows me to refresh the browser locally once that remote command succeeds would be even more dreamy.

id_rsa with passphrase

How de we use sync js with a id_rsa private key with a passphrase ?

if i use the option 'Ask password during connection' i get
"All configured authentication methods failed"

if on the other hand i use 'Path to private key' with a id_rsa key which needs a passphrase i get
'Error: Encrypted private key detected, but no passphrase given'

Any way to use syncjs under these conditions? or it only works with a PK without a passphrase?

thank you

Windows?

Hi, this could be quite useful. Do you know if it will work on Windows?

The initialisation step does not allow me to input the final (y/n) step

After filling out all the necessary fields of the syncjs init, the program asks:

Does this look good? (Y/n)

However, it always just exits out of the process.

I have tried this on Command Prompt and Windows PowerShell, and with two different remote servers.
image

I hope this isn't something stupid I've missed out on, and thank you in advance.

Error after 5 minutes

When i use "syncjs" and dont change any files the connection get lost after about 5 minutes every time. When i ssh into my account without syncjs the connection dont get lost after 5 minutes.

events.js:167
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TCP.onread (net.js:657:25)
Emitted 'error' event at:
    at Client.<anonymous> (/Users/xxx/.nvm/versions/node/v10.2.1/lib/node_modules/syncjs/node_modules/scp2/lib/client.js:81:10)
    at Client.emit (events.js:182:13)
    at Socket.<anonymous> (/Users/xxx/.nvm/versions/node/v10.2.1/lib/node_modules/syncjs/node_modules/ssh2/lib/client.js:215:10)
    at Socket.emit (events.js:187:15)
    at emitErrorNT (internal/streams/destroy.js:82:8)
    at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
    at process._tickCallback (internal/process/next_tick.js:63:19)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] sync: `syncjs`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] sync script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/xxx/.npm/_logs/2019-03-05T16_28_25_262Z-debug.log
luther$ 

multi-path is heavily need and has it support

But there still a little problem: is the project support multipath?
For example, I want to scp a(local) to b(remote), and c(local) to d(remote).

Now I wrote the following format, but it didn’t work.

image

Then what is the corrent format, or did it support the function?

Thanks a million and look forward for your replying.

Is there any way to do an initial sync?

When syncjs is running and I make a change to a file, that change is nicely uploaded to the FTP server. It works really fast too. However, if I have made any local changes while syncjs was not running and then I run syncjs, these changes do not get uploaded (caught up). Is there any a quick way to upload them?

ignores in config file

is it possible to write some additional "ignores" in my config file. I try, but it doesn't work.

{
    "username": "xxxxxxxxx",
    "password": "xxxxxxxxx",
    "host": "xxxxxxxxx",
    "localPath": "xxxxxxxxx",
    "remotePath": "xxxxxxxxx",
    "ignores": [
    	".package-lock.json"
    ]
}

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.