git-deploy icon indicating copy to clipboard operation
git-deploy copied to clipboard

Cannot setup via SSH (AuthenticationFailed error)

Open gioele opened this issue 12 years ago • 7 comments

I set up my remote for deploy using

$ git remote add production "ssh://userAAA@server:port/web/dir"

While running

$ git deploy setup -r "production"

I get the following error:

gems/net-ssh-2.6.8/lib/net/ssh.rb:207:in `start': userAAA (Net::SSH::AuthenticationFailed)
    from gems/git-deploy-0.6.0/lib/git_deploy/ssh_methods.rb:96:in `ssh_connection'
    from gems/git-deploy-0.6.0/lib/git_deploy/ssh_methods.rb:43:in `ssh_exec'
    from gems/git-deploy-0.6.0/lib/git_deploy/ssh_methods.rb:35:in `run_test'
    from gems/git-deploy-0.6.0/lib/git_deploy.rb:28:in `setup'
    from gems/thor-0.14.6/lib/thor/task.rb:22:in `run'
    from gems/thor-0.14.6/lib/thor/invocation.rb:118:in `invoke_task'
    from gems/thor-0.14.6/lib/thor.rb:263:in `dispatch'
    from gems/thor-0.14.6/lib/thor/base.rb:389:in `start'
    from gems/git-deploy-0.6.0/bin/git-deploy:3:in `<top (required)>'
    from bin/git-deploy:23:in `load'
    from bin/git-deploy:23:in `<main>'

gioele avatar Jul 19 '13 18:07 gioele

Does connecting require a password? Because as far as I know git-deploy has no password prompt so that's is probably the reason why it's failing.

koenpunt avatar Jul 19 '13 19:07 koenpunt

Yes, it does require a password.

Couldn't git-deploy support passwords prompts or, at least, warn about them?

gioele avatar Jul 19 '13 20:07 gioele

It could, I'll look into it. If anyone wants to solve this in Ruby, go ahead. The net/ssh library probably has an extra option for this or something.

For now, just setup key authentication. You'll do crazy if you have to re-enter the password on every deploy.

mislav avatar Jul 19 '13 21:07 mislav

I have encounterd the same problem. My remote server opened a ssh server port at 5022 not 22,and I specify the port as follow: git add production "user@server:5022/path"

and I use git deploy setup -r "production" and i have received the same message (Net::SSH::AuthenticationFailed)

And I used tcpdump to observe the packets,it showed me that git-deploy tried to connect to port 22,not 5022 that I specified.

fanchangyong avatar Aug 01 '14 07:08 fanchangyong

seems like @mislav is not maintaining this repo any more. any chance one of you guys fork it? I'd help if I could

hadifarnoud avatar Aug 05 '14 19:08 hadifarnoud

I'm not maintaining it lately but I'm still using it simply because it works for me.

If an extra option should be needed, I'll review any PR that's opened against this repo. Thanks!

mislav avatar Aug 05 '14 20:08 mislav

That's awesome. I haven't used it yet. All I care is a working version. It's good enough as is.  _____________________________ From: Mislav Marohnić [email protected] Sent: Wednesday, August 6, 2014 1:07 am Subject: Re: [git-deploy] Cannot setup via SSH (AuthenticationFailed error) (#45) To: mislav/git-deploy [email protected] Cc: Hadi Farnoud [email protected]

I'm not maintaining it lately but I'm still using it simply because it works for me.

If an extra option should be needed, I'll review any PR that's opened against this repo. Thanks!

— Reply to this email directly or view it on GitHub.

hadifarnoud avatar Aug 05 '14 20:08 hadifarnoud