Menu
AWS CodeDeploy
User Guide (API Version 2014-10-06)

Step 2: Create a GitHub Repository

You will need a GitHub repository to store the revision.

If you already have a GitHub repository, be sure to substitute its name for CodeDeployGitHubDemo throughout this tutorial, and then skip ahead to Step 3: Upload a Sample Application to Your GitHub Repository.

  1. On the GitHub home page, do one of the following:

    • In Your repositories, choose New repository.

    • On the navigation bar, choose Create new (+), and then choose New repository.

  2. In the Create a new repository page, do the following:

    • In the Repository name box, type CodeDeployGitHubDemo.

    • Select Public.

      Note

      Selecting the default Public option means that anyone can see this repository. Although you can select the Private option to limit who can see and commit to the repository, this option may result in additional charges from GitHub.

    • Clear the Initialize this repository with a README check box. You will create a README.md file manually in the next step instead.

    • Choose Create repository.

  3. Follow the instructions for your local machine type to use the command line to create the repository.

    Note

    If you have enabled two-factor authentication on GitHub, make sure you enter your personal access token instead of your GitHub login password if prompted for a password. For information, see Providing Your 2FA Authentication Code.

    On local Linux, macOS, or Unix machines:

    1. From the terminal, run the following commands, one at a time, where user-name is your GitHub user name:

      Copy
      mkdir /tmp/CodeDeployGitHubDemo
      Copy
      cd /tmp/CodeDeployGitHubDemo
      Copy
      touch README.md
      Copy
      git init
      Copy
      git add README.md
      Copy
      git commit -m "My first commit"
      Copy
      git remote add origin https://github.com/user-name/CodeDeployGitHubDemo.git
      Copy
      git push -u origin master
    2. Leave the terminal open in the /tmp/CodeDeployGitHubDemo location.

    On local Windows machines:

    1. From a command prompt running as an administrator, run the following commands, one at a time:

      Copy
      mkdir c:\temp\CodeDeployGitHubDemo
      Copy
      cd c:\temp\CodeDeployGitHubDemo
      Copy
      notepad README.md
    2. In Notepad, save the README.md file. Close Notepad. Run the following commands, one at a time, where user-name is your GitHub user name:

      Copy
      git init
      Copy
      git add README.md
      Copy
      git commit -m "My first commit"
      Copy
      git remote add origin https://github.com/user-name/CodeDeployGitHubDemo.git
      Copy
      git push -u origin master
    3. Leave the command prompt open in the c:\temp\CodeDeployGitHubDemo location.