Answer the question
In order to leave comments, you need to log in
Bitbucket (Github) - how to organize automatic deploy?
Tell me how to properly organize deploy. I think these same questions apply to github as well.
There is a server on debian, each project is under its own user, another user does not see the files of another project.
There is a tutorial on hooks on the net, for example. f6design.com/journal/2013/11/19/automated-git-depl...
But it's not clear:
1. Under which user to install the ssh key. Because not willing to leave a hole with free access to all repositories on the server.
2. Do I need to set a key from each user every time?
Or from root?
Answer the question
In order to leave comments, you need to log in
Your key anyway.
The easiest option is via cron:
crontab -e
*/5 * * * * cd /project/dir && git pull origin master (or fetch, as you usually pull
)
Well, the third one is deployers, for example, capistrano. But there you will have to get even more confused with users, rights and keys.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question