The GitHub repository for each Quick Start includes the following folders:
Do not worry if some of the folders described above doesn’t make sense, yet. As you follow along the rest of the workshop, things will get more clear.
Copy the url of your github repo
Clone the repo by running the following command. Replace GITHUB_REPO_URL with your url.
git clone GITHUB_REPO_URL
You should see following output.
Admin:~/environment $ git clone https://github.com/sshvans/qs-workshop.git Cloning into ‘qs-workshop’… warning: You appear to have cloned an empty repository.
Admin:~/environment $ git clone firstname.lastname@example.org:sshvans/qs-workshop.git Cloning into 'qs-workshop'... The authenticity of host 'github.com (18.104.22.168)' can't be established. RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8. RSA key fingerprint is MD5:16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'github.com,22.214.171.124' (RSA) to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
If you see above error message, it means you are using SSH URL to clone the repository, and you don’t have SSH private key setup on your development environment machine.
To quick fix the issue, run
git clone GITHUB_REPO_URL with HTTPS URL of your GitHub repo.
When a Quick Start repo is created by the Quick Start team, all the folders are pre-created for you. But, as you are creating your own repo for this workshop, you need to create necessary folders.
To make this task easy, we have pre-created the scaffolding and configurations files. Run the following commands to download the scaffolding and files.
Go to repo
Download and load the content in your repo
curl https://raw.githubusercontent.com/aws-quickstart/quickstart-workshop-labs/master/workshop-base/base.tar | tar -x
Add and Commit your changes
git add --all .
git commit -a -m 'Load base content'
You should see the following output.
[master (root-commit) ab0660b] Load base content 3 files changed, 33 insertions(+) create mode 100644 ci/taskcat.yml create mode 100644 ci/workshop_input.json create mode 100644 templates/workshop.template.yaml
Now that you have your changes committed locally to your repo, we will push these changes to github remote master branch.
You should see the following output.
Enumerating objects: 7, done. Counting objects: 100% (7/7), done. Delta compression using up to 8 threads Compressing objects: 100% (6/6), done. Writing objects: 100% (7/7), 753 bytes | 753.00 KiB/s, done. Total 7 (delta 0), reused 0 (delta 0) To github.com:avattathil/qs-workshop.git ** [new branch] master -> master
Admin:~/environment/qs-workshop (master) $ git push Username for 'https://github.com':
Don’t worry if you see the above prompt. It’s asking you to enter the github username and password to authenticate your git action. You see this prompt because you are doing git push for the first time. Here onwards, Git has cached your credentials in memory for the time period specified in Setup Git CLI step.
Enter your github username and personal token (for password) to push the changes. Your output should look like following:
Admin:~/environment/qs-workshop (master) $ git push Username for 'https://github.com': sshvans Password for 'https://email@example.com': Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (6/6), done. Writing objects: 100% (7/7), 830 bytes | 830.00 KiB/s, done. Total 7 (delta 0), reused 0 (delta 0) To https://github.com/sshvans/qs-workshop.git * [new branch] master -> master
When you create a GitHub repository, it only contains master branch.
As a best practice, you should keep the development and release branches separate. We will use develop branch for development and master branch for releases of the Quick Start.
Currently, we only have master branch in our github repo. So, let’s create a develop branch from the master branch.
Create and checkout develop branch from master
git checkout -b develop
Push develop branch to remote and set the upstream
git push --set-upstream origin develop
Your output should look like below:
Warning: Permanently added the RSA host key for IP address '126.96.36.199' to the list of known hosts. Total 0 (delta 0), reused 0 (delta 0) remote: remote: Create a pull request for 'develop' on GitHub by visiting: remote: https://github.com/avattathil/qs-workshop/pull/new/develop remote: To github.com:avattathil/qs-workshop.git ** [new branch] develop -> develop Branch 'develop' set up to track remote branch 'develop' from 'origin'.