Skip to content

gitlab_github_ide

Kilian Holzapfel edited this page Dec 15, 2021 · 1 revision

Github

Download a repository (git clone)

In order to download an exiting repository, follow the official GitHub guid. GitLab works nearly the same, only search for the Clone(GitLab) instead of the Code(GitHub) button. Make sure you select the HTTPS (Token) or SSH link, depending on your setup.

GitHub or GitLab? It's nearly the same. GitHub is service for developing and sharing software hosted by Microsoft. As an alternative there are open source tools like GitLab. Those open source tools can be self-hosted, e.g. the GitLab at LRZ. Working with both - GitHub or GitLab - is nearly identical. In the terminal, both work with the command git.

PyCharm

PyCharm is a powerful IDE for various coding languages. And it helps to develop python code way faster and more professional.

To start download the latest PyCharm version, connect your GitHub or GitLab or both accounts. One method per server is enough, either ssh or https/token. And the server, GitHub or GitLab (can be multiple server) depends on where the repository is located. Therefore, you have to select one of the following options:

If successfully, you can clone an existing repository described in this link.

Connect GitLab/GitHub - ssh key

In PyCharm, open Settings/Preferences -> Version Control -> Subversion -> SSH and add the path to your Private Key. Add your public key to GitHub or GitLab via the webpage. Follow the links for GitLab or GitHub.

Connect GitLab with https token

First you have to install the Gitlab Plugin:

  1. In PyCharm, open Settings/Preferences -> Plugins (official Plugins doc).
  2. Make sure to select Marketplace, search for GitLab Projects(plugin homepage) and install it.
  3. Restart PyCharm - You will be prompted usually.
  4. And add a new GitLab Server

Add a new GitLab Server

  1. Open Settings/Preferences -> Version Control -> GitLab, click Add new GitLab Server and fill in:
  2. GitLab UI Server Url: https://gitlab.lrz.de/
  3. GitLab Personal Access Token: Create a new token and make sure you select api.
    1. If the link doesn't work. On gitlab.lrz.de: 'Avatar' (upper right corner) -> Edit profil -> Access Tokens
  4. Preferred checkout method: HTTPS
  5. Press apply and ok, now you are set to go.

Connect GitHub with https token

The steps and logic is nearly the same as in the GitLab-https-Token section. Here the official PyCharm guid to register an existing account. If you don't have an GitHub account, create one first.

Clone this wiki locally