ericpaulbishop / redmine_git_hosting

A ChiliProject/Redmine plugin which makes configuring your own git hosting easy.
186 stars 37 forks source link

run_git_as_git_user returns "eval: command not found" #130

Open fabianonline opened 12 years ago

fabianonline commented 12 years ago

Hi.

I've set up redmine_git_hosting according to the tutorial. Right now, everything's working, except for everything concerning run_git_as_git_user. Trying to run it returns:

$ /tmp/redmine_git_hosting/run_git_as_git_user "--version"
sudo: eval: command not found

By try and error I found that sudo -u git -i eval "git --version" leads to this error, but I couldn't find out why. Of course I could change the command to something like sudo -u git git --version, but I suppose there's some reasoning to use eval here... isn't it?

virtualdc commented 12 years ago

Hello.

This command works only with sudo version 1.7.0 or higher.

I suggest to change the sudo -u git -i eval "git ..." to sudo -u git -i -- -c "git ..." to compatibility with old sudo.

With best regards, Alexey.