Question 1: They relate to the user on the remote server.
Question 2: It depends on two scenarios: 1. You will need to add the public key of your local user in order to click on your remote server. 2. You will need to add the public key to the local user, which launches the hook after receiving, if ssh is required for deployment to another server. Most likely, only 1 is your problem, and 2 is not because the git repository and www server will be hosted on the remote server.
This means that you are adding the public key to the authorized_keys file in linux / unix environment. This file is usually located in the directory / home / $ USER / .ssh / authorized_keys. The authorized_keys file is in the same directory as the known_hosts file for the user.
Question 3: They explain how to set up a remote git repository. This does not have to be on the same path as your local repository.
OK - now to clarify what is really happening here. In the tutorial, you will learn how to set up a remote repository that will deploy a jekyll installation each time it is clicked.
This means that if you have a github rep, you cannot configure the server box. Most likely, you have set up a new remote on your remote server. Say you go to your server (usually with ssh), run pwd to find out your full path or set it in an environment variable:
$DIR=`pwd`
Now you can create a bare repo on this server:
git init --bare $DIR/<SOMEDIRNAME>.git
You now have a remote bare git repository on your server. Then you need to add a hook that allows it to expand the Jekyll site after receiving the click. The list you specified has a fairly simple deployment, but basically all it does is create a page-site-site-site-site, you can do it in several ways, I suggest you do it without violating your users as much as possible. this is a sample script that can do such a thing:
#!/bin/bash # Assuming a directory structure for www: # $www_root/releases # $www_root/shared # $www_root/current # all releases go in releases dir as timestamps dirs # any logs or other shared items go in shared dir - shared/logs # current is a symlink to latest release unset GIT_DIR WWW_ROOT=/PATH/TO/WWW REPO_PATH=/PATH/TO/REPO REPO_BRANCH=master SITE_DIR=/PATH/TO/_SITE/DIR/IN/REPO DATE=$(date +"%Y%m%d%H%M") # get code if [ ! -d $WWW_ROOT/shared/git_maint ]; then mkdir -p $WWW_ROOT/shared/git_maint cd $WWW_ROOT/shared/git_maint git clone $REPO_PATH $WWW_ROOT/shared/git_maint git checkout master else cd $WWW_ROOT/shared/git_maint git pull git checkout master fi # do deploy if [ ! -d $WWW_ROOT/releases/$DATE ]; then mkdir $WWW_ROOT/releases/$DATE; fi cp -ar $WWW_ROOT/shared/git_maint/$SITE_DIR $WWW_ROOT/releases/$DATE ln -snf $WWW_ROOT/releases/$DATE $WWW_ROOT/current exit 0
Something like this would be a good deployment. If you save this script on your remote server to a bare repository / file after receiving it, it will run every time the repository is clicked. Remember to make it executable: chmod 755 hooks/post-receive So, if you add this new remote to your git repository with:
git remote add DEPLOY_PROD user@remote.server.com :/path/to/bare/repo
Then git push DEPLOY_PROD - it will click on your remote, and then your remote repo will launch its hook after receiving, and then copy the bare repo down to the service directory, which can be deflated at almost any point. This directory is then used to convert the dir directory to the release directory, and then linked to the main directory.
Of course, all this is most likely redundant, and you can simply create a deployment script that runs from your local host to do all this via ssh.
The problem is that you cannot start cache servers directly from github for this methodology, so you need to get around it. I would advise you to check capistrano as a deployment strategy - the current / releases / shared dirs and git_maint dir are taken from their schema, it works well.
Let me know if you want any help here, I have a lot of experience in developing deployment strategies and automatic deployment, so depending on your situation, everything will depend.