Skip to content
This repository was archived by the owner on Mar 18, 2018. It is now read-only.

Rsync authentication issue #12

Closed
AntJanus opened this issue Feb 11, 2015 · 8 comments
Closed

Rsync authentication issue #12

AntJanus opened this issue Feb 11, 2015 · 8 comments
Labels

Comments

@AntJanus
Copy link
Contributor

I'm trying to deploy an app and while Shipit has no trouble whatsoever with logging into to the server (and creating new folders, etc.), Rsync fails on authentication. Here's my config:

shipit.initConfig({
  default: { 
    workspace: '/temp/app',
    deployTo: '/home/deploy/www/',
    repositoryUrl: 'git@github.com:antjanus/my-private-repo.git'
    keepReleases: 2,
    key: 'provisioning/files/ssh/id_rsa',
    shallowClone: true
  },
  beta: {
    servers: 'beta.my-site.com'
  }
});

The SSH key is included in the Repo (and that's on purpose). Using ssh beta@my-site.com -i provisioning/files/ssh/id_rsa logs me in no problem; however, whenever I run shipit beta deploy, I get this error:

Copy project to remote servers.
Remote copy "/temp/app/" to "deploy@beta.my-site.com:/home/deploy/www/releases/20150211200256"
@beta.my-site.com-err Permission denied, please try again.
@beta.my-site.com-err Received disconnect from 184.173.18.122: 2: Too many authentication failures for deploy
@beta.my-site.com-err rsync: connection unexpectedly closed (0 bytes received so far) [sender]
@beta.my-site.com-err rsync error: error in rsync protocol data stream (code 12) at io.c(235) [sender=3.1.1]

Which I'm not understanding at all since the key is straightforward and declared in the app and I can already use it to log in from the command line.

I'm on a windows machine btw, so I wonder if the workspace variable is what is messing it up. I could not get a clear understanding as to where that directory is supposed to be, locally or remote. But it doesn't seem to matter.

Thoughts?

@gregberge
Copy link
Member

I am sorry but I don't know what can be the problem. You know Windows is not supported either as a deploy environment or either as a remote environment. Let me know if you find the problem.

@AntJanus
Copy link
Contributor Author

@neoziro I didn't realize it was platform limited. I'd love to help out to bring about Windows as an environment from which you can deploy. It seems like the only issue currently is the improper key usage for rsync or something.

I looked through the code of Shipit for the remote copy and besides the pathing (using / instead of path.sep), it all looks good. I'll give fixing it a shot. This module honestly fulfills 90% of my business needs (beside the actual copying).

Also, question, is there a reason why the files get built locally and rsynced/etc. rather than checking out the repo remotely?

@gregberge
Copy link
Member

@AntJanus did you resolve your problem?

Yes the reason is that in most of case, the build phase is very expensive in term of CPU (uglify, etc..) so I prefer to do it on a CI server or on my machine to prevent lags on the remote server. It's not a good practice to run the build on a production server.

@AntJanus
Copy link
Contributor Author

@neoziro I never really resolved the issue of using a custom ssh key and specifying the path to the key; however, adding the key to my ~/.ssh folder and adding the correct entry into my config file did the trick. Now I just have to configure the rest of the application deployment process.

@gregberge
Copy link
Member

@AntJanus OK weird. I close it.

@AntJanus
Copy link
Contributor Author

Yeah, I guess. Well, at least there's an issue open now that anyone with a Windows machine can review in case they encounter the same problem.

@gregberge gregberge reopened this Mar 15, 2015
@gregberge
Copy link
Member

Should be fixed by #49

@AntJanus
Copy link
Contributor Author

AntJanus commented Apr 6, 2015

@neoziro thanks! I'll have to try this out :)

# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Development

No branches or pull requests

2 participants