On this workflow, does git command needs to be installed on the production server?

会有一股神秘感。 提交于 2019-12-12 02:07:47

问题


  • Developer A - Local Repository --> pulls/push ---> github
  • Developer B - Local Repository --> pulls/push ---> github

  • Capistrano would remain on our developers' machines, however we will define :repository to point to our GitHub project: set :repository, "git@github.com:myuser/myproject.git" # My clone url

  • Developer A OR Developer B must be allowed to deploy committed files to the production machine.

Question 1)
Those committed files will come from one of the Developers machines, correct?

Question 2)
Will this procedure require that my shared host HAS do have git command support, or not?

Thanks a lot.


回答1:


1) By default Capistrano will deploy from the repository, so the files getting deployed would come from the code that is checked into github. You can configure Capistrano to deploy it from the developers local machine by using a different "deployment strategy" See here: http://rubydoc.info/gems/capistrano/2.5.19/Capistrano/Deploy/Strategy/Copy

2) Depends on what you end up doing, using the default strategy that pulls code from github, you will need git installed, if you use the Copy Strategy linked above, you would not.




回答2:


Using github and capistrano means that your servers will need access to the github repo to pull down new releases. Capistrano doesn't pull from the machine that executes the deploy, it runs "git fetch xxxx" (or whatever commands you specify) to the github repo it's pointed at.

Use deployment keys from github to manage security and you will need to open an outbound firewall port 9418



来源:https://stackoverflow.com/questions/5319198/on-this-workflow-does-git-command-needs-to-be-installed-on-the-production-serve

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!