Till innehåll på sidan

Connecting to the KTH Github server for students (gits)

Instructions on how to connect to the KTH Github server for students

Users are recommended to download and install the Github client for Windows. The default graphical client included in the Github client for Windows is however not capable of handling the type of login procedure that is required by the KTH Github server for students (gits).

The following guide contains instructions on proper way to connect to gits and assumes you have already downloaded and installed the Github client for windows.

  1. Begin by starting the Git (bash) shell ( on Windows  or on macOS ) and generate your ssh-keypair according to the following guide https://help.github.com/articles/generating-ssh-keys/
    Do not use Putty(gen) to generate keypairs.
  2. Go to this guide:
    docs.github.com/en/free-pro-team@latest/developers/overview/managing-deploy-keys
    and specifically read the section "Deploy keys" on how to add the keys to your account (or you wont be able to log in at all).
  3. If you have not done so, create your repository on:
    https://gits-15.sys.kth.se/
  4. Copy the SSH-login link from the repository page (see attached image) to use with Github shell for instance.
    git uri for cloning a repository

    The complete link should be in the form:
    git@gits-15.sys.kth.se:[username]/[repo name].git
    [##] = current year (two digits)
    [username] = KTH username (NOT e-mail!)
    [repo name] = the name listed at the top of the repo page
  5. Use the "git clone" or "git remote" command with the full link from the webpage in the Git shell to manage your repository (upload/download files). When in Github shell you can also run the command git-gui which will give you a graphical tool for managing your repository. You can use the same ssh-link from the page to connect to your repository in this GUI-version.
    (Note: gui-gui is not the same graphical client as the default Github client for Windows)
Innehållsansvarig:it-support@kth.se
Tillhör: KTH Intranät
Senast ändrad: 2022-04-13