how to set up ssh access to a company github repo

  • create a personal github account for the company

  • create a ssh key

  • add ssh key to the github account via web settings

  • create .ssh/config stanza

    host github.com
            User githubusername
            IdentityFile ~/.ssh/github.sshkey.pub
  • set up git:

            git config --global user.name "dave capella"
            git config --global user.email davec@company.com
            git config --global core.editor vim
  • create a directory for the company’s repo

            mkdir -p company/repo
            cd company/repo
  • clone the repo

            git clone git@github.com:company/repo.git