Hello everyone,

At last, I managed to figure out something.
It is a bit crude, but it works.

The way to send the SSH options is like this:
repositories.release_to[:options]=
 {:ssh_options=>{:auth_methods=> 'password'}}

The patch is attached :)


On 5/31/11, Marc-André Laverdière <[email protected]> wrote:
> By the way, I tried with PasswordAuthentication yes and that didn't help.
>
>
> On 5/7/11, Marc-André Laverdière <[email protected]> wrote:
>> I will try that. It would be nice to document that thing though. I had an
>> entry in that file but I did not know I could use it.
>> On 06-May-2011 11:28 PM, "Alex Boisvert" <[email protected]> wrote:
>>> /5/5 Marc-André Laverdière <[email protected]>
>>>
>>>> Hello everyone,
>>>>
>>>> Here is my first patch for buildr. I hope that many more are coming :)
>>>>
>>>
>>> Hi Marc-André,
>>>
>>> I can see how that fixes the problem for you -- however it would likely
>> not
>>> work for other people who rely on key-based auth.
>>>
>>> The usual place for this kind of configuration is your ~/.ssh/config
>>> file
>>> where you can define host-specific settings.
>>>
>>> Here are the options that net:ssh supports,
>>> http://net-ssh.github.com/ssh/v2/api/classes/Net/SSH/Config.html
>>>
>>> Perhaps you can try adding "PasswordAuthentication yes" in your
>>> ~/.ssh/config and see if that works.
>>>
>>> <http://net-ssh.github.com/ssh/v2/api/classes/Net/SSH/Config.html>alex
>>
>
>
> --
> Marc-André LAVERDIÈRE
> "Perseverance must finish its work so that you may be mature and complete,
> not lacking anything." -James 1:4
> http://asimplediscipleslife.blogspot.com/
> mlaverd.theunixplace.com
>


-- 
Marc-André LAVERDIÈRE
"Perseverance must finish its work so that you may be mature and complete,
not lacking anything." -James 1:4
http://asimplediscipleslife.blogspot.com/
mlaverd.theunixplace.com
From 5a29eac3db16251d6972d21ca605c8ab5032e031 Mon Sep 17 00:00:00 2001
From: Marc-Andre Laverdiere <[email protected]>
Date: Fri, 3 Jun 2011 15:59:48 +0530
Subject: [PATCH] Modification allowing to give options to the underlying SSH 
 API.

---
 lib/buildr/packaging/artifact.rb |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/lib/buildr/packaging/artifact.rb b/lib/buildr/packaging/artifact.rb
index 640bb83..e07b13e 100644
--- a/lib/buildr/packaging/artifact.rb
+++ b/lib/buildr/packaging/artifact.rb
@@ -212,8 +212,10 @@ module Buildr
 
         task = Rake::Task.define_task uri + path => deps do
           # Upload artifact relative to base URL, need to create path before uploading.
+          options_hash = upload_to[:options]
+          options_hash[:permissions] = upload_to[:permissions]
           info "Deploying #{to_spec}"
-          URI.upload uri + path, name, :permissions=>upload_to[:permissions]
+          URI.upload uri + path, name, options_hash
         end
       end
       task
-- 
1.7.5.2

Reply via email to