[chef] Re: Re: cloning from github


Chronological Thread 
  • From: Aamir Hassan < >
  • To:
  • Subject: [chef] Re: Re: cloning from github
  • Date: Tue, 22 Feb 2011 15:53:46 +0400
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=jGyGIUxdZd9DfsPK/bZ2ijZDgMNbMWPBnviNIk4jMm55H9SsOhTALxy/f4hEbb/mg0 oaPS/CBpe2iaBZdU0MNk68jSe0SHgn17WfVvmimpcLf8TzYlUR/0wD4qrNtTRP1cSQsr CBkRyZR00CSa5tKRmEWJxPS4TLSbNpcOK3gio=

Hi

I tried like this -

git "/home/test/" do
  remote " :testdb/test.git"
  reference "master"
  ssh_key node[:deploy_key]
  action :sync
end

and when I run chef-client it gives this error -

[Tue, 22 Feb 2011 03:31:33 -0800] INFO: Starting Chef Run (Version 0.9.12)
[Tue, 22 Feb 2011 03:31:36 -0800] ERROR: Running exception handlers
[Tue, 22 Feb 2011 03:31:36 -0800] ERROR: Exception handlers complete
/usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/resource.rb:144:in `method_missing': undefined method `ssh_key' for Chef::Resource::Git (NoMethodError)

Any tips guys?



On Mon, Feb 21, 2011 at 12:26 PM, Aamir Hassan < "> > wrote:
Hi Avishai,

This is a private node , I have added the id_rsa.pub to github.

On Mon, Feb 21, 2011 at 10:54 AM, Avishai Ish-Shalom < " target="_blank"> > wrote:
Is the private on the chef-client node? is it stored as the default key
(id_rsa)?

If not, you probably need an ssh-git wrapper script.

Regards,
Avishai


On 02/21/2011 08:09 AM, " target="_blank"> wrote:
> Hi,
>
> I am trying to clone from github, I created a new cookbook and added this to
> the recipe -
>
> git "/home/test/" do
>   repository " :testdb/testfile.git"
>   reference "master"
>   action :sync
> end
>
> I have a question, Should I use "sync" or "checkout" to clone? and I have added
> the public_keys of the virtual machine I m testing to github, I tested by
> giving a git clone from the node and it works.
>
> This is the error that pops up -
> ---------------------------------------------------------------------------------------------------------------------------------------------
> /usr/lib/ruby/gems/1.8/gems/chef-0.9.12/bin/../lib/chef/provider/git.rb:159:in
> `remote_resolve_reference':  returned 128, expected 0 (RuntimeError)
> ---- Begin output of  ----
> STDOUT:
> STDERR: Permission denied (publickey).
> fatal: The remote end hung up unexpectedly
> ---- End output of  ----
>
> Could not access the remote Git repository. If this is a private repository,
> please verify that the deploy key for your application has been added to your
> remote Git account.
> --------------------------------------------------------------------------------------------------------------------------------------------
>
>
> This is what shows in debug -
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> [Sun, 20 Feb 2011 21:57:29 -0800] DEBUG: Processing git[/home/dubizzle/django/]
> on ubuntu.localdomain
> [Sun, 20 Feb 2011 21:57:29 -0800] DEBUG: git[/home/dubizzle/django/] revision:
> [Sun, 20 Feb 2011 21:57:29 -0800] DEBUG: Executing git ls-remote
> :dubizzle/django.git master
> [Sun, 20 Feb 2011 21:57:29 -0800] DEBUG: Executing git ls-remote
> :dubizzle/django.git master
> [Sun, 20 Feb 2011 21:57:32 -0800] DEBUG: ---- Begin output of git ls-remote
> :dubizzle/django.git master ----
> [Sun, 20 Feb 2011 21:57:32 -0800] DEBUG: STDOUT:
> [Sun, 20 Feb 2011 21:57:32 -0800] DEBUG: STDERR: Permission denied
> (publickey).^M
> fatal: The remote end hung up unexpectedly
> [Sun, 20 Feb 2011 21:57:32 -0800] DEBUG: ---- End output of git ls-remote
> :dubizzle/django.git master ----
> [Sun, 20 Feb 2011 21:57:32 -0800] DEBUG: Ran git ls-remote
> :dubizzle/django.git master returned 128
> [Sun, 20 Feb 2011 21:57:32 -0800] ERROR: git[/home/dubizzle/django/]
> (/var/chef/cache/cookbooks/files/recipes/default.rb:10:in `from_file') had an
> error:
>  returned 128, expected 0
> ---- Begin output of  ----
> STDOUT:
> STDERR: Permission denied (publickey).^M
> fatal: The remote end hung up unexpectedly
> ---- End output of  ----
>
> Could not access the remote Git repository. If this is a private repository,
> please verify that the deploy key for your application has been added to your
> remote Git account.
> --------------------------------------------------------------------------------------------------------------------------------------------
>
> Please do correct me if I am doing any steps wrong here.
>
> Thanks in advance.





Archive powered by MHonArc 2.6.16.

§