[chef] Accessing Github private repository from chef-solo


Chronological Thread 
  • From: < >
  • To:
  • Subject: [chef] Accessing Github private repository from chef-solo
  • Date: Mon, 7 May 2012 11:22:27 -0700 (PDT)

When running the command  rvmsudo chef-solo -l debug -L /tmp/chef-solo.log -c
/etc/chef/solo.rb -j /etc/chef/node.json > /tmp/chef_solo.log 2>&1
I get the following error:

[Fri, 04 May 2012 14:45:43 +0100] DEBUG: Processing
deploy_revision[jorum_rails]
 on vm-jorum.ds.man.ac.uk
[Fri, 04 May 2012 14:45:43 +0100] INFO: Processing 
deploy_revision[jorum_rails]
action deploy (application::rails line 165)
[Fri, 04 May 2012 14:45:43 +0100] DEBUG: deploy_revision[jorum_rails] 
resolving
remote reference
[Fri, 04 May 2012 14:45:43 +0100] DEBUG: deploy_revision[jorum_rails] sh(git
ls-
remote 
:argaric/jorum_rails.git
 HEAD)
[Fri, 04 May 2012 14:45:45 +0100] ERROR: deploy_revision[jorum_rails]
(applicati
on::rails line 165) has had an error
[Fri, 04 May 2012 14:45:45 +0100] ERROR: deploy_revision[jorum_rails]
(/etc/chef
/cookbooks/application/recipes/rails.rb:165:in `from_file') had an error:
deploy_revision[jorum_rails] (application::rails line 165) had an error:
Chef::E
xceptions::ShellCommandFailed: Expected process to exit with [0], but received
'
128'
---- Begin output of git ls-remote 
:argaric/jorum_rails.git
 HEAD
-
---
STDOUT:
STDERR: ERROR: Repository not found.
fatal: The remote end hung up unexpectedly
---- End output of git ls-remote 
:argaric/jorum_rails.git
 HEAD
---
-
Ran git ls-remote 
:argaric/jorum_rails.git
 HEAD returned 128

I can ssh to the github server

rvmsudo ssh -T 

Hi argaric! You've successfully authenticated, but GitHub does not provide
shell access.

Also when I run this command it appears to work:

rvmsudo git ls-remote 
:argaric/jorum_rails.git
 HEAD
c9db02c04da61a5b4621bf98519e79c2d1961801 HEAD

I have the Key for root in the following locations:

/etc/chef/data_bags/apps/jorum_rails.json:141:   "deploy_key" : "-----BEGIN
RSA PRIVATE KEY----- ...

/etc/chef/data_bags/keys/jorum.json:3: "key": "-----BEGIN RSA PRIVATE KEY-----

I have added the public key to the private Github repository
:argaric/jorum_rails.git

Any ideas?

Ben


  • [chef] Accessing Github private repository from chef-solo, ben.ryan, 05/07/2012

Archive powered by MHonArc 2.6.16.

§