Sourcetree Ssh Key Gitlab

  • Get the SSH public key through script. Cat /.ssh/ You can see the summary which you wrote. Set the SSH public key on GitLab at Profile settings. You can connect to GitLab for testing with command. It means you succeed when seeing the same info below. Clone by SourceTree.
  • Stage 1 – Generating a SSH key Open SourceTree and click on the Terminal icon (this is Git Bash) Type the following command in ls –all /.ssh (this will list any existing ssh keys in C: Users.ssh, this is the default but can be changed when generating the key).
  • The Secure Shell (SSH) key is based on the principle of Public-key cryptography. It is used as a way of authentication. By generating an SSH key pair, you will get a private key and a public key. You can image public key as a padlock. You can distribute it to any systems on the Internet. Private key is like a key.

GitLab Setup Logging In to GitLab. Sign in to the CS GitLab server using the “SFU ID” option and your usual SFU username and password. Set up an SSH key. You'll probably want to access the repository by SSH. If you don't already have an SSH key, you will need to generate one. This is easy on Linux (steps 1-3 there), or on a Mac.

Sourcetree Gitlab Auth Blocker

In Sourcetree, when I select “” (private token auth type is selected by default), I enter my Gitlab username and password (SSH, I cannot change the to the recommended ED25519 option.

Gitlab Ssh Password

Even though the correct user name and password are entered, I get the following error:
“Login error, We couldn’t connect to GitLab with your (username) credentials. Check your username and try the password again.”

I’ve tried connecting via Gitlab CE and also through HTTPS. Nothing seems to work though I can git commit via Terminal.

Has anyone else encountered this auth issue with GitLab? I was formerly on GitHub and didn’t have any issues with auth. I did enable 2FA if this causes problems with Sourcetree?

Skip to end of metadataGo to start of metadata

This tutorial shows you how to connect Sourcetree and Gitlab

Step-by-step guide

Repository ssh key gitlab
  1. Open Sourcetree, if you have not installed it yet go to Installing Sourcetree and finish that tutorial first
  2. That will open the following window:
  3. after this you should get a window that looks like this:
  4. You can save the keys anywhere on your hard drive, just make sure you remember where you put them.
  5. Then open a browser and go to and log in using your LRZ user name (aa11bbb)
  6. Now you can close the window in which you create the key and go to Tools/options in Sourcetree
  7. The Pageant client should be running now, if you do not see the symbol, extend the taskbar
  8. Now sourcetree can access gitlab but you do not have any projects in Sourcetree yet. In order to download or upload code you need to have a project.
  9. This tutorial will show you how to get the base V-HAB project into sourcetree, the steps to get any other project into sourcetree are basically the same.
  10. First go to the gitlab project you want to download, in this case STEPS-base, the website should look like this:
  11. After that just hit the clone button at the bottom of the window and you will receive the project. Now your Sourcetree should be connected to gitlab and you are able to download code from gitlab or upload code to gitlab
AddGitlab ssh keys windows

Ssh To Gitlab

For instruction on how to use Sourcetree go to the next tutorial

Sourcetree Gitlab Ssh Key

Related articles