The "authentication failed for 'not-specified'" is saying that the user it is trying to authenticate is 'not-specified' (that's the default user name capistrano uses if it can't otherwise infer the user name). You will probably need to set the :user variable to the user you want capistrano to log in as.

- Jamis

On May 26, 2008, at 9:25 AM, ant wrote:


I am trying to run a capistrano script via cron that gets apache logs
from a server behind my production environments firewall.  The script
looks like this:

<code>
set :gateway, "xxx.xxx.xxx.xxx"
ssh_options[:port] = xxxx
role :logs, "protected"

task :get_httpd_logs do
 ['access_log'].each do |log_file|
   get "/var/log/httpd/#{log_file}", "/var/log/production_httpd/
#{log_file}"
 end
end
</code>

I have ssh-agent setup via keychain, and the script runs fine when I
run it via the command line:

<output>
 * executing `get_httpd_logs'
   servers: ["protected"]
 * establishing connection to gateway `xxx.xxx.xxx.xxx'
 * establishing connection to `protected' via gateway
   connected: `protected' (via gateway)
** sftp download /var/log/httpd/access_log -> /var/log/
production_httpd/access_log
   [protected] /var/log/httpd/access_log
   [protected] done
 * sftp download complete
</output>

But when I run it via cron, I get this strange stty error that I think
has something to do with the fact cron isn't supplying a terminal:

<output>
 * executing `get_httpd_logs'
   servers: ["protected"]
 * establishing connection to gateway `xxx.xxx.xxx.xxx'
stty: standard input: Invalid argument
stty: standard input: Invalid argument
stty: standard input: Invalid argument
authentication failed for `not-specified'
</output>

Has anyone run into a similar problem before?  Does anyone know how to
get around this?
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---


Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to