Gitorious local install attempting to write ssh keys to /home/root/.ssh/authorized_keys

271 views
Skip to first unread message

Gregory Rice

unread,
Apr 3, 2012, 4:26:33 PM4/3/12
to Gitorious
Hey guys,

My local install is writing to the wrong authorized_keys location
instead of /home/git/.ssh/authorized_keys.

I know this from the messaging log when I try to add another public
key:

Rails available: Adding dispatcher prepare callback.
Rails available: Adding dispatcher prepare callback.
SshKeyProcessor::on_error: Errno::ENOENT raised: No such file or
directory - /root/.ssh/authorized_keys
SshKeyProcessor::on_error: ActiveMessaging::AbortMessageException
raised: ActiveMessaging::AbortMessageException

What did I do wrong?

Thanks,
Greg Rice

Thomas Kjeldahl Nilsson

unread,
Apr 6, 2012, 2:55:40 AM4/6/12
to gito...@googlegroups.com
Hi Gregory,

In a stock Gitorious install the Rails server process should be run by
the git user, not root: ie. changes to ~/.ssh/authorized_keys should
resolve to the git user home directory, not roots .ssh. So if you run
everything as root you will have problems. Could this be the problem?

cheers,
Thomas

--
best regards,
Thomas Kjeldahl Nilsson
http://gitorious.com

Kelketek Titikilik Rritaa

unread,
Apr 6, 2012, 7:46:05 AM4/6/12
to gito...@googlegroups.com
There should be a setting in your config/gitorious.yaml file
concerning which user is being used. You may also need to specifically
specify the home environment variable in environment.rb with a line
like:

ENV['HOME'] = '/home/git'

> --
> To post to this group, send email to gito...@googlegroups.com
> To unsubscribe from this group, send email to
> gitorious+...@googlegroups.com

Marius Mårnes Mathiesen

unread,
Apr 12, 2012, 7:15:09 AM4/12/12
to gito...@googlegroups.com
On Fri, Apr 6, 2012 at 1:46 PM, Kelketek Titikilik Rritaa <kelk...@gmail.com> wrote:
There should be a setting in your config/gitorious.yaml file
concerning which user is being used. You may also need to specifically
specify the home environment variable in environment.rb with a line
like:

ENV['HOME'] = '/home/git'

or you could pass HOME to where you start the poller script from:

$ HOME=/home/git script/poller start

Cheers,
- Marius
Reply all
Reply to author
Forward
0 new messages