我最后用一个亲信解决了这个问题。我在有问题的服务器上的主目录中签出了代码的本地副本
ubuntu
用户。然后我添加了
乌班图
用户的ssh密钥到我自己的github帐户,以及用于capistrano部署的帐户。然后,我将此设置为每天运行:
#!/usr/local/bin/ruby
# Get the latest nurax master
# Make a branch with today's date and update hyrax
# Push and deploy that branch
today = Time.now.strftime('%Y-%m-%e-%H-%M')
`cd /home/ubuntu/nurax; git checkout master; git pull; git checkout -b "#{today}"`
`cd /home/ubuntu/nurax; bundle update hyrax`
`cd /home/ubuntu/nurax; git commit -a -m 'Daily update for "#{today}"'; git push --set-upstream origin #{today}`
`cd /home/ubuntu/nurax; BRANCH_NAME="#{today}" cap nurax-dev deploy`
`cd /home/ubuntu/nurax; git checkout master; git branch -d "#{today}"; git push origin --delete "#{today}"`