[Capistrano] problem with cat /etc/passwd do |ch, stream, data|
Hi I saw the following code on http://blog.innerewut.de/2007/9/28/capturing-output-in-capistrano and thought it was capistrano run cat /etc/passwd do |ch, stream, data| if stream == :err logger.debug capured output on STDERR: #{data} else # stream == :out logger.debug capured output on STDOUT: #{data} end end but I get a syntax error when trying to run it as a task. capfile:53:in `load': compile error (SyntaxError) capfile:53: syntax errorfrom /usr/lib/ruby/gems/1.8/gems/ capistrano-2.5.3/lib/capistrano/configuration/loading.rb:172:in `load_from_file' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:89:in `load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:86:in `load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:86:in `each' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:86:in `load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:64:in `load_recipes' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:64:in `each' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:64:in `load_recipes' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:30:in `execute!' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:14:in `execute' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/bin/cap:4 from /usr/bin/cap:16:in `load' from /usr/bin/cap:16 Is this ruby code I am trying to run or is there something I am doing wrong? Regards --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Capistrano::ConnectionError
Hi, I am getting a ConnectionError on Solaris. Works find on Linux. anyone know what causes this error? Capistrano::ConnectionError, connection failed for: IPADDRESS (Net::SSH::Exception: could not settle on encryption_client algorithm) --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Capistrano::ConnectionError
This might be ssh v1 vs. v2 issues, are you definately using SSH v2, with v2 keys? (i think it is a difference between DSA, and RSA keys)- Lee 2009/1/15 Xazoola col...@gmail.com Hi, I am getting a ConnectionError on Solaris. Works find on Linux. anyone know what causes this error? Capistrano::ConnectionError, connection failed for: IPADDRESS (Net::SSH::Exception: could not settle on encryption_client algorithm) --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: problem with cat /etc/passwd do |ch, stream, data|
Make sure you aren't getting some fancy quotes from the copy/paste. Often, code copy/pasted from a blog post will include fancy quotes and mdashes instead of ascii quotes and hyphens, and ruby does not recognize those characters as valid in its syntax. - Jamis On 1/15/09 4:30 AM, Gerhardus Geldenhuis wrote: Hi I saw the following code on http://blog.innerewut.de/2007/9/28/capturing-output-in-capistrano and thought it was capistrano run cat /etc/passwd do |ch, stream, data| if stream == :err logger.debug capured output on STDERR: #{data} else # stream == :out logger.debug capured output on STDOUT: #{data} end end but I get a syntax error when trying to run it as a task. capfile:53:in `load': compile error (SyntaxError) capfile:53: syntax errorfrom /usr/lib/ruby/gems/1.8/gems/ capistrano-2.5.3/lib/capistrano/configuration/loading.rb:172:in `load_from_file' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:89:in `load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:86:in `load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:86:in `each' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/configuration/loading.rb:86:in `load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:64:in `load_recipes' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:64:in `each' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:64:in `load_recipes' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:30:in `execute!' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/lib/ capistrano/cli/execute.rb:14:in `execute' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.3/bin/cap:4 from /usr/bin/cap:16:in `load' from /usr/bin/cap:16 Is this ruby code I am trying to run or is there something I am doing wrong? Regards --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Capistrano::ConnectionError
This can also be caused if your SSH server is configured to allow only a small subset of cipher algorithms, and that subset does not overlap any of the algorithms that Net::SSH supports. Net::SSH supports the following ciphers: aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc rijndael-...@lysator.liu.se idea-cbc none (Though it is strongly recommended to not use 'none'. It's really only useful for debugging Net::SSH.) If there is a cipher you want that isn't included there, you'll need to see how to make Ruby's OpenSSL bindings provide it. - Jamis On 1/15/09 8:37 AM, Lee Hambley wrote: This might be ssh v1 vs. v2 issues, are you definately using SSH v2, with v2 keys? (i think it is a difference between DSA, and RSA keys) - Lee 2009/1/15 Xazoola col...@gmail.com mailto:col...@gmail.com Hi, I am getting a ConnectionError on Solaris. Works find on Linux. anyone know what causes this error? Capistrano::ConnectionError, connection failed for: IPADDRESS (Net::SSH::Exception: could not settle on encryption_client algorithm) --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Capistrano::ConnectionError
You have just nailed it. There was a SSH CBC vulnerability reported by US-CERT. http://www.kb.cert.org/vuls/id/958563 I'm not sure how the vulnerability is exploited. But to be safe, I disable all CBC related ciphers. After enabling all the default ciphers aes128-ctr,aes128-cbc,arcfour, 3des-cbc,blowfish-cbc, the encryption_client algorithm is solved. do you know anything about this SSH CBC vulnerability? If it is a security problem when CBC related cipher enabled on SSH server, any plan for Net:SSH to support non CBC ciphers? On Jan 15, 4:03 pm, Jamis Buck ja...@37signals.com wrote: This can also be caused if your SSH server is configured to allow only a small subset of cipher algorithms, and that subset does not overlap any of the algorithms that Net::SSH supports. Net::SSH supports the following ciphers: aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc rijndael-...@lysator.liu.se idea-cbc none (Though it is strongly recommended to not use 'none'. It's really only useful for debugging Net::SSH.) If there is a cipher you want that isn't included there, you'll need to see how to make Ruby's OpenSSL bindings provide it. - Jamis On 1/15/09 8:37 AM, Lee Hambley wrote: This might be ssh v1 vs. v2 issues, are you definately using SSH v2, with v2 keys? (i think it is a difference between DSA, and RSA keys) - Lee 2009/1/15 Xazoola col...@gmail.com mailto:col...@gmail.com Hi, I am getting a ConnectionError on Solaris. Works find on Linux. anyone know what causes this error? Capistrano::ConnectionError, connection failed for: IPADDRESS (Net::SSH::Exception: could not settle on encryption_client algorithm) --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Capistrano::ConnectionError
I had heard of it, but I am not a crypto guru, and I have no idea how to make OpenSSL support those (which is what Net::SSH depends on). Perhaps someone more crypto-saavy than I will be able to pipe in and say oh, heck, you just need to do X and Y and you're all set. :) - Jamis On 1/15/09 10:02 AM, Xazoola wrote: You have just nailed it. There was a SSH CBC vulnerability reported by US-CERT. http://www.kb.cert.org/vuls/id/958563 I'm not sure how the vulnerability is exploited. But to be safe, I disable all CBC related ciphers. After enabling all the default ciphers aes128-ctr,aes128-cbc,arcfour, 3des-cbc,blowfish-cbc, the encryption_client algorithm is solved. do you know anything about this SSH CBC vulnerability? If it is a security problem when CBC related cipher enabled on SSH server, any plan for Net:SSH to support non CBC ciphers? On Jan 15, 4:03 pm, Jamis Buck ja...@37signals.com wrote: This can also be caused if your SSH server is configured to allow only a small subset of cipher algorithms, and that subset does not overlap any of the algorithms that Net::SSH supports. Net::SSH supports the following ciphers: aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc rijndael-...@lysator.liu.se idea-cbc none (Though it is strongly recommended to not use 'none'. It's really only useful for debugging Net::SSH.) If there is a cipher you want that isn't included there, you'll need to see how to make Ruby's OpenSSL bindings provide it. - Jamis On 1/15/09 8:37 AM, Lee Hambley wrote: This might be ssh v1 vs. v2 issues, are you definately using SSH v2, with v2 keys? (i think it is a difference between DSA, and RSA keys) - Lee 2009/1/15 Xazoola col...@gmail.com mailto:col...@gmail.com Hi, I am getting a ConnectionError on Solaris. Works find on Linux. anyone know what causes this error? Capistrano::ConnectionError, connection failed for: IPADDRESS (Net::SSH::Exception: could not settle on encryption_client algorithm) --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Capistrano::ConnectionError
ok, and many thanks for your solution! On Jan 15, 5:03 pm, Jamis Buck ja...@37signals.com wrote: I had heard of it, but I am not a crypto guru, and I have no idea how to make OpenSSL support those (which is what Net::SSH depends on). Perhaps someone more crypto-saavy than I will be able to pipe in and say oh, heck, you just need to do X and Y and you're all set. :) - Jamis On 1/15/09 10:02 AM, Xazoola wrote: You have just nailed it. There was a SSH CBC vulnerability reported by US-CERT. http://www.kb.cert.org/vuls/id/958563 I'm not sure how the vulnerability is exploited. But to be safe, I disable all CBC related ciphers. After enabling all the default ciphers aes128-ctr,aes128-cbc,arcfour, 3des-cbc,blowfish-cbc, the encryption_client algorithm is solved. do you know anything about this SSH CBC vulnerability? If it is a security problem when CBC related cipher enabled on SSH server, any plan for Net:SSH to support non CBC ciphers? On Jan 15, 4:03 pm, Jamis Buck ja...@37signals.com wrote: This can also be caused if your SSH server is configured to allow only a small subset of cipher algorithms, and that subset does not overlap any of the algorithms that Net::SSH supports. Net::SSH supports the following ciphers: aes128-cbc 3des-cbc blowfish-cbc cast128-cbc aes192-cbc aes256-cbc rijndael-...@lysator.liu.se idea-cbc none (Though it is strongly recommended to not use 'none'. It's really only useful for debugging Net::SSH.) If there is a cipher you want that isn't included there, you'll need to see how to make Ruby's OpenSSL bindings provide it. - Jamis On 1/15/09 8:37 AM, Lee Hambley wrote: This might be ssh v1 vs. v2 issues, are you definately using SSH v2, with v2 keys? (i think it is a difference between DSA, and RSA keys) - Lee 2009/1/15 Xazoola col...@gmail.com mailto:col...@gmail.com Hi, I am getting a ConnectionError on Solaris. Works find on Linux. anyone know what causes this error? Capistrano::ConnectionError, connection failed for: IPADDRESS (Net::SSH::Exception: could not settle on encryption_client algorithm) --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Deploying from a specific path with a Git repo
Thanks for the reply. I understand the best practice of 1 repo == 1 project. But sometimes it just doesn't make sense. For example, I have another big rails app that is not ready for deployment yet, but I'd like to display a semi-functional splash site that uses lots of the same assets. So I have a one-file sinatra app sitting in another directory in the repo rather than creating another repo with duplicate files for this purpose. It would be nice in this case just to deploy that dir (which could have it's own teensy Capfile). Further complicating things is the fact that you can indeed check out paths of submodules, which seems like it doesn't fit with the 1 repo == 1 project philosophy. But this is not a git discussion board so I'll leave it that, except to say thanks for Cap, it's a fantastic tool. On Jan 14, 4:46 pm, Jamis Buck ja...@37signals.com wrote: Does does not let you check out a just subdirectory of a repository. If you want to deploy just a subdirectory, you'll need to write your own tasks that check out the repo locally, and then bundle up the subdirectory you wish to deploy. Git best-practice is to use one repository for one project. - Jamis On 1/14/09 11:22 AM, Henry wrote: Greetings, I have a Git repo that contains a few small sinatra apps. So I would like to deploy them one at at time. So I need to set a path within the repo to deploy, but I can't figure out how to do it. This is what I've tried: set :repository, g...@github.com:me/myrepo.git/app1 But that doesn't work. Any suggestions? Thanks! --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Deploying from a specific path with a Git repo
On Thu, Jan 15, 2009 at 11:44 AM, Henry hpoy...@gmail.com wrote: ...I have another big rails app that is not ready for deployment yet, but I'd like to display a semi-functional splash site that uses lots of the same assets. So I have a one-file sinatra app sitting in another directory in the repo rather than creating another repo with duplicate files for this purpose. I realize that is the easier way of doing it, but I wouldn't call it a best practice. On the last major project I had, we had our own from-scratch-and-plugins Rails app, and a Mephisto implementation, a Spree implementation, and a Castronaut implementation. We did two things: First, we did actually duplicate the files between them, when necessary. In this case, the original Rails app was on SVN, and everything else was on Git. Second, we used a separate asset server -- really the same machine, but it could be anything, and we were considering doing that with Amazon S3. So we built a separate project which was just the assets, and wrote a deploy task that just ran deploy:update_code and deploy:symlink -- then configured nginx to serve files directly from there, statically. Bonus: Browser caching works, now, since the two apps will be pointing to the same URLs, not just copies of the same file. And finally, for the things which were too hard to do that with, or which we simply didn't want to bother changing yet -- for example, a common layout file -- we put that in its own repository, and used submodules. I don't know how well this maps onto the default tasks, though. I remember writing a lot of my own -- probably more than I needed to, but enough that I'm sure if I wanted to do what you're suggesting, I could have pretty easily. Further complicating things is the fact that you can indeed check out paths of submodules, which seems like it doesn't fit with the 1 repo == 1 project philosophy. Well, a submodule is sort of an alternative to using symlinks. I think it does make sense that it's possible to map a subdirectory to a subdirectory -- you might not need the entire other project, or your project might be extremely sensitive to directory structure. --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---
[Capistrano] Re: Deploying from a specific path with a Git repo
On 15 ene, 18:44, Henry hpoy...@gmail.com wrote: Thanks for the reply. I understand the best practice of 1 repo == 1 project. But sometimes it just doesn't make sense. For example, I have another big rails app that is not ready for deployment yet, but I'd like to display a semi-functional splash site that uses lots of the same assets. So I have a one-file sinatra app sitting in another directory in the repo rather than creating another repo with duplicate files for this purpose. It would be nice in this case just to deploy that dir (which could have it's own teensy Capfile). Seeing as you have two versions of the same thing, sounds like a job for branches: master for the Rails implementation, in development; and sinatra for the placeholder. At least, that's the way I would do it. If they weren't two versions of the same thing but actually two different apps then I would do what Jamis says and have two repos. Wincent --~--~-~--~~~---~--~~ To unsubscribe from this group, send email to capistrano-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/capistrano -~--~~~~--~~--~--~---