If you want to pull an organisation repository to an EC2 instance, you can either register an SSH key with your pluralis.ai github account, OR generate a Personal Access Token (PAT) to clone the repository. Here are the steps for doing this:

SSH Keys

  1. Generate a public SSH key. In shell:
ssh-keygen -t ed25519 -C "[email protected]"
cat ~/.ssh/id_ed25519.pub
  1. You should get a key that starts with the following:
ssh-ed25519*
  1. You can specify the SSH key to your Github profile

image.png

  1. To pull and push to the repository you need to config your git username and user email. You can choose to do it at a global level (once off for the instance/dev container). To configure globally:
git config --global user.name "YourUserName"
git config --global user.email "[email protected]"

Personal Access Token (PAT)

  1. On your Github account, go to Settings, and then Developer settings

image.png

  1. Go to "Personal access tokens" then press "Generate new token":

image.png

  1. Follow instructions to generate your Personal Access Token (PAT). Now you can clone a private repository from any machine using this PAT using the following command:

    git clone <https://<your-PAT>@github.com/><your account or organization>/<repo>.git
    

    To pull from Pluralis dev repo:

    git clone <https://<your-PAT>@github.com/PluralisResearch/dev.git>
    
  2. If you want persistent access to private repositories in the organization, setup your credential helper with your PAT:

    echo "<https://<your-PAT>:[email protected]>" > ~/.git-credentials
    git config --global credential.helper store