GitHub

Connecting your ActiveState project and a GitHub repository (repo) can be done at any time in your project’s development, to do so you will need:

  1. An ActiveState project
  2. an active GitHub account with a repo or branch you want to link to your project.

After the above conditions are met, integrating your ActiveState project and GitHub repo can be done using the following two methods:

  1. Adding the link to your GitHub repo into your project settings.
  2. Importing your project’s activestate.yaml file into your GitHub repo.

To share your ActiveState project with others, make sure that the project is set to Public and not Private, or that those you want to share it with are already a part of your organization.


  1. Find the URL of the GitHub repo you want to connect to your ActiveState project.
  2. Log in to your ActiveState Platform account.
  3. Go to the Project Settings tab of your project.
  4. In the “GitHub Repo URL” field paste the link to your repo.

alt_text

  1. Click Save Changes.

After saving changes any user that checks out the same project on their local machine will also pull down the associated git repo into their project folder. One command will fetch both your repo and runtime.

Your GitHub repo will only be pulled down to your project folder on the initial checkout of your project. To update your project use the state pull command, and to update your repo use the git pull command. Git commands will work in your activated state even if there is no Git client on your local machine, as your project will have a Git client included.


Adding your activestate.yaml file to your GitHub repo

  1. Open your local ActiveState project folder to find the activestate.yaml file.
  2. Go to the Git repo you want to connect to your ActiveState project and import the activestate.yaml from your project folder into the repo.

alt_text

Now anyone who clones that repo can activate the runtime by opening a command terminal, going to the cloned working directory, and entering state shell to deploy a virtual environment for your runtime.

To update your project use the state pull command and to update your repo use the git pull command in your command terminal. Git commands will work in your activated state even if there is no Git client on your local machine, as your project will have a Git client included. Now other members of your team only need to clone the repo to begin working with the ActiveState project directly.


Visit our GitHub quickstart guide to find out more about GitHub and ActiveState.