Git "nonexistent/.ssh" issue

Okay, so I've abandoned using Mercurial and converted repo to Git.
I'm using git from within the Application cookbook, which uses scm.

Looks like it fails because it can't create the file and dir for the
user it is running as (presumably root).
Any idea how to fix that?

I'm getting my deploy_key from a data bag. Just to confirm -- the
deploy_key is the ascii representation of the key, not a file path, right?

Mixlib::ShellOut::ShellCommandFailed


Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote
git@bitbucket.org:lkirsher/server-git.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).
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
---- End output of git ls-remote
git@bitbucket.org:lkirsher/server-git.git master ----
Ran git ls-remote git@bitbucket.org:lkirsher/server-git.git master
returned 128

--
Liam Kirsher
PGP: http://liam.numenet.com/pgp/

The problem isn't on the server end, at least not at first, the problem is
your client can't cache the ssh host key of the server. You need to resolve
that for it to communicate with the server, or your client will consider it
untrusted.

On Friday, June 7, 2013, Liam Kirsher wrote:

Okay, so I've abandoned using Mercurial and converted repo to Git.
I'm using git from within the Application cookbook, which uses scm.

Looks like it fails because it can't create the file and dir for the user
it is running as (presumably root).
Any idea how to fix that?

I'm getting my deploy_key from a data bag. Just to confirm -- the
deploy_key is the ascii representation of the key, not a file path, right?

Mixlib::ShellOut::ShellCommandFailed


Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote
git@bitbucket.org:lkirsher/server-git.git <javascript:_e({}, 'cvml',
'git@bitbucket.org:lkirsher/server-git.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).
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
---- End output of git ls-remote git@bitbucket.org:lkirsher/server-git.git<javascript:_e({}, 'cvml', 'git@bitbucket.org:lkirsher/server-git.git');>master ----
Ran git ls-remote git@bitbucket.org:lkirsher/server-git.git<javascript:_e({}, 'cvml', 'git@bitbucket.org:lkirsher/server-git.git');>master returned 128

--
Liam Kirsher
PGP: http://liam.numenet.com/pgp/

--

~~ StormeRider ~~

"Every world needs its heroes [...] They inspire us to be better than we
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

Also, check the home directory of the user running this. That's the only
place I can think of that /nonexistent to come from.

On Friday, June 7, 2013, Morgan Blackthorne wrote:

The problem isn't on the server end, at least not at first, the problem is
your client can't cache the ssh host key of the server. You need to resolve
that for it to communicate with the server, or your client will consider it
untrusted.

On Friday, June 7, 2013, Liam Kirsher wrote:

Okay, so I've abandoned using Mercurial and converted repo to Git.
I'm using git from within the Application cookbook, which uses scm.

Looks like it fails because it can't create the file and dir for the user
it is running as (presumably root).
Any idea how to fix that?

I'm getting my deploy_key from a data bag. Just to confirm -- the
deploy_key is the ascii representation of the key, not a file path, right?

Mixlib::ShellOut::ShellCommandFailed


Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote
git@bitbucket.org:lkirsher/server-git.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).
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
---- End output of git ls-remote
git@bitbucket.org:lkirsher/server-git.git master ----
Ran git ls-remote git@bitbucket.org:lkirsher/server-git.git master
returned 128

--
Liam Kirsher
PGP: http://liam.numenet.com/pgp/

--

~~ StormeRider ~~

"Every world needs its heroes [...] They inspire us to be better than we
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

--

~~ StormeRider ~~

"Every world needs its heroes [...] They inspire us to be better than we
are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

Yeah, I figured someone else had encountered this before and would have
solution.
scm allows setting the ssh deploy shell, which I could make contain

|-o UserKnownHostsFile=/dev/null|

Or, alternatively, set up different user/group. (currently nobody/nogroup)

On 06/07/2013 05:40 PM, Morgan Blackthorne wrote:

The problem isn't on the server end, at least not at first, the
problem is your client can't cache the ssh host key of the server. You
need to resolve that for it to communicate with the server, or your
client will consider it untrusted.

On Friday, June 7, 2013, Liam Kirsher wrote:

Okay, so I've abandoned using Mercurial and converted repo to Git.
I'm using git from within the Application cookbook, which uses scm.

Looks like it fails because it can't create the file and dir for
the user it is running as (presumably root).
Any idea how to fix that?

I'm getting my deploy_key from a data bag.  Just to confirm -- the
deploy_key is the ascii representation of the key, not a file
path, right?
Mixlib::ShellOut::ShellCommandFailed

------------------------------------

Expected process to exit with [0], but received '128'
---- Begin output of git ls-remote
git@bitbucket.org:lkirsher/server-git.git <javascript:_e({},
'cvml', 'git@bitbucket.org:lkirsher/server-git.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).
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
---- End output of git ls-remote
git@bitbucket.org:lkirsher/server-git.git <javascript:_e({},
'cvml', 'git@bitbucket.org:lkirsher/server-git.git');> master ----
Ran git ls-remote git@bitbucket.org:lkirsher/server-git.git
<javascript:_e({}, 'cvml',
'git@bitbucket.org:lkirsher/server-git.git');> master returned 128
-- 
Liam Kirsher
PGP: http://liam.numenet.com/pgp/

--

~~ StormeRider ~~

"Every world needs its heroes [...] They inspire us to be better than
we are. And they protect from the darkness that's just around the corner."

(from Smallville Season 6x1: "Zod")

On why I hate the phrase "that's so lame"... http://bit.ly/Ps3uSS

--
Liam Kirsher
PGP: http://liam.numenet.com/pgp/