Added sudo to "git push origin...." so that it is now "sudo git push origin".
This may compromise security I do not know enough about sudo and git to
comment on it. However what I do know is that this was the only way to get
rake deploy to work for me.