问题
- 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