Zum Inhalt springen

Create your first Git service

Diese Seite ist noch nicht in deiner Sprache verfügbar. Englische Seite aufrufen

In this Getting started guide you will create an instance and configure it. This guide shows the most common settings for a small developer environment. When following this guide, you will work with the STACKIT Portal.

  1. Visit the STACKIT Portal.
  2. On the sidebar click on Git.
  3. On the bar on the top click on Create Git.

After completing the steps, you see an overlay with three sections (General information, Plans and Storage).

  • Enter a name for the instance (e.g. the company name)
  • Choose the plan Git10 unless you know in advance how much resources you’ll need.

Once the capacity is exceeded, the disk space and object storage space will be upgraded to accommodate required capacity. Instance capacity upgrades are available in 11GB increments, which include: 1GB Disk Space, 10GB Object Storage and 1 Additional User.

After reviewing every setting, click on Order fee-based to create your new instance. Then you will see a confirmation that your instance is created. Your new instance will be added to the list of instances. After a few minutes it will switch from Creating to Ready.

  1. Visit the STACKIT Portal.

  2. In the sidebar click on Git.

  3. In the list of all available instances click on the Access URL.

    (e.g https://[instanceName].git.onstackit.cloud)

  4. On the bar on the top click on Sign In and then Sign in with STACKIT IDP.

  5. After login, you see the start page of STACKIT Git.

  6. Click the ”+“-Sign on the top right of the page and select + New repository from the menu.

  7. Enter the details of your new repository.

    For a quick start, specify only Owner and Repository name and use default values or fill the fields later for all other entries. A complete list with all avaible parameters is avaible in How to set up a Git Repository

    Form fieldExplanation
    OwnerHere, you can specify whether you want this to be your own personal project or whether you want it to be part of an organization that you’re a part of
    Repository nameA name for your repository (which will also be part of its path)
  8. Click Create Repository.

Generate credentials for the git repository

Section titled “Generate credentials for the git repository”
  1. On the top bar, click on your profile icon and select settings in the dropdown menu.

  2. In the Public profile area, copy your username.

  3. Select Applications in the left navigation bar.

  4. Create a new Access token.

    • Enter a Token name
    • Select All
    • Open Select permissions and select at least repository read and write
    • Click Generate token. The Token is only visible once. Store it for future use.
  1. Go to your user settings like described above.
  2. Select SSH / GPG keys in the left navigation.
  3. Click Add key to add a new SSH key.

For instructions on how to generate SSH keys, refer to Generate and Upload SSH Keys.

If you want to start a fresh project (that is, if you do not already have source code that you want to upload to STACKIT Git), the quickest way to get started is to clone your newly created repository like this:

  1. Create a dedicated directory for your new project and navigate to it on the command line.

    Terminal window
    mkdir my-new-project
    cd my-new-project
  2. Clone the repository by executing the command git clone.

    Terminal window
    git clone [url]
  3. Enter your username

  4. Enter your access token

  5. Navigate to the cloned repository.

    Terminal window
    cd [repositoryName]
  1. Create a new file or edit a file in the repository

  2. Add each modified file to your commit

    Terminal window
    git add .
  3. Commit your changes with a message

    Terminal window
    git commit -m "[commit message]"
  4. Push your changes to STACKIT Git

    Terminal window
    git push

Reload the overview page. The just pushed files and changes are visible in your STACKIT Git repository.

Now you executed some basic commands. From here on you can dig deeper with the How-tos.