- From: AJ Christensen <
>
- To:
- Subject: [chef] Re: Could not create directory '/nonexistent/.ssh'. (may be red herring)
- Date: Sat, 7 Jul 2012 10:07:20 +1200
looks like whichever user you are using for git/deploy, is set home
directory to /nonexistent, which doesn't exist, so ssh_known hosts can
be written. maybe adjust the home directory or instruct SSH where to
store the known hosts in the event the default cannot be written to.
--AJ
On 7 July 2012 09:38, Denis Haskin
<
>
wrote:
>
I've been using the application cookbook just fine for a while for
>
deployments of my rails app to AWS. I deploy from a github private repo,
>
using a deploy key at github (and have the private key for it in the app
>
data bag).
>
>
I'm trying to do the first deploy of a major overhaul of my project; it's in
>
a new github repo. I've copied over all of my chef-repo files, created a
>
new deploy key at github (see note below), updated the data bag on the chef
>
server with the changes.
>
>
However, when I try to deploy I get the error below. Suggestions on what
>
I'm doing wrong, how to fix?
>
>
[Fri, 06 Jul 2012 21:29:00 +0000] ERROR: deploy_revision[zmx_app]
>
(application::rails line 155) has had an error
>
[Fri, 06 Jul 2012 21:29:00 +0000] ERROR: deploy_revision[zmx_app]
>
(/var/chef/cache/cookbooks/application/recipes/rails.rb:155:in `from_file')
>
had an error:
>
deploy_revision[zmx_app] (application::rails line 155) had an error:
>
Chef::Exceptions::ShellCommandFailed: Expected process to exit with [0], but
>
received '128'
>
---- Begin output of git ls-remote
>
:zmxmusic/zmx2.git
>
master
>
----
>
STDOUT:
>
STDERR: Could not create directory '/nonexistent/.ssh'.
>
Failed to add the host to the list of known hosts
>
(/nonexistent/.ssh/known_hosts).
>
ERROR: Repository not found.
>
fatal: The remote end hung up unexpectedly
>
---- End output of git ls-remote
>
:zmxmusic/zmx2.git
>
master
>
----
>
Ran git ls-remote
>
:zmxmusic/zmx2.git
>
master returned 128
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/shell_out.rb:206:in
>
`invalid!'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/shell_out.rb:192:in
>
`error!'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/mixin/shell_out.rb:36:in
>
`shell_out!'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/provider/git.rb:189:in
>
`remote_resolve_reference'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/provider/git.rb:178:in
>
`target_revision'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/provider/deploy/revision.rb:46:in
>
`release_slug'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/provider/deploy.rb:45:in
>
`load_current_resource'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource.rb:439:in
>
`run_action'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:45:in
>
`run_action'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:81:in `block (2
>
levels) in converge'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:81:in `each'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:81:in `block in
>
converge'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection.rb:94:in
>
`block in execute_each_resource'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:116:in
>
`call'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:116:in
>
`call_iterator_block'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:85:in
>
`step'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:104:in
>
`iterate'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection/stepable_iterator.rb:55:in
>
`each_with_index'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/resource_collection.rb:92:in
>
`execute_each_resource'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/runner.rb:76:in
>
`converge'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:312:in
>
`converge'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/client.rb:160:in `run'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:239:in
>
`block in run_application'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in
>
`loop'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application/client.rb:229:in
>
`run_application'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/lib/chef/application.rb:67:in
>
`run'
>
/usr/lib/ruby/gems/1.9.1/gems/chef-0.10.8/bin/chef-client:26:in `<top
>
(required)>'
>
/usr/bin/chef-client:19:in `load'
>
/usr/bin/chef-client:19:in `<main>'
>
>
Here's the relevant part of my data bag's source JSON:
>
>
"repository":
>
"
:zmxmusic/zmx2.git",
>
"deploy_key":"-----BEGIN RSA PRIVATE KEY----- ...elided ... -----END RSA
>
PRIVATE KEY-----\n",
>
>
I suspect maybe the new deploy key isn't being used? Not sure why that
>
would be, though.
>
>
Note re: the deploy key: I had to switch to a new deploy key as I didn't
>
seem to be able to add my existing deploy key to be a deploy key for a
>
different repository.
>
>
Thanks!
>
>
dwh
Archive powered by MHonArc 2.6.16.