It’s time to fo the third part of the tasks that Ken gave us, so let’s start:
- Ensure that you have your GitHub account.
Well this was done pretty much when i started my carrer, here is my account if you like to check it out: https://github.com/mmaxBA
- Ensure that you have a repository created for testing. I recommend some form of web content, but you can choose your content for the testing. You should put this in the root of your web server that you created in DevOps part 2, Linux Server Setup (Individual)
This one was also done from the time we started the semester:
- Setup your GitHub two-factor authentication.
- Setup your SSH keys so that you are able to connect to GitHub repositories using ssh.
- Ensure that you can do a git clone (use ssh) to your server from your repository. You should do this.
So I an make a git clone so everything should be okey
- Make changes to your repository (you can do this any method including via the GitHub site).
I made a small change to a web page I’ve been creating for another class, to test, I changed the title from «Evo» to «Evo 2015» (don’t ask why 2015):
- Ensure that you can update your server copy with a simple «git pull origin master» at the command line from the directory where you have pulled your data.
I found a problem, when i was trying to make the push to the repository, it would told me that my username or password was wrong, but i knew they were correct, so I search and found that I had to create a new token and use that token as password, I will have to search if there is another way to authenticate my account because there is no way i can remember that token from heart. If there is no other way then I guess it adds more security because it will have to access through HTTP first then retrieve the token and etc.
- Does the webpage update if you reload that this code sits in?
And yep, the page title change so everything is great.
- Automate those updates using what you learned about cron in DevOps part 2, Linux Server Setup (Individual). How often should you update? How do you ensure (and you should do this) that you do not end up with two copies of your update script running at the same time?
I must say that this part is still a little confusing for me, but i think the updates should be every week maybe, i don’t use it much. But if I’ve been honest I have no clue of how to do it correctly, I think i’ll have to ask Ken!!