B
B
bernex2014-04-16 06:05:41
git
bernex, 2014-04-16 06:05:41

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

3 answer(s)
H
hOtRush, 2014-04-16
@hOtRush

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.

B
bernex, 2014-04-16
@bernex

Yes, I thought there was a common key, each one has its own set .. The
script would automatically create a key and add it to the system, so that it remains only to add to bitbucket

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question