Category Archives: Git

SSH Key Authentication with GitLab

Every time i start building a product for a new company, one of the first step is creating a repository and uploading SSH key. Instead of browsing the web looking for a reminder on how to do it, i decided i’ll post the quickest solution here.


1. Enter the following command in the Terminal window (Mac OS X)

ssh-keygen -t rsa


2. Accept default location and leave password blank (or not, up to you)


3. The key will get generated

Your identification has been saved in /Users/mariuszprzydatek/.ssh/id_rsa.
Your public key has been saved in /Users/mariuszprzydatek/.ssh/
The key fingerprint is:
ce:80:76:66:5b:5d:d2:29:3d:64:66:65:e8:d3:aa:5e mariuszprzydatek@Mariuszs-MacBook-Pro.local
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|         .       |
|        E .      |
|   .   . o       |
|  o . . S .      |
| + + o . +       |
|. + o = o +      |
| o...o * o       |
|.  oo.o .        |


4. The private key (id_rsa) is saved in the .ssh directory and used to verify the public key. The public key ( is the key you’ll be uploading to your GitLab account.


5. Copy your public key to the clipboard

pbcopy < ~/.ssh/


6. Paste the key to GitLab


GitLab SSH Key Authentication





Git branch name in zsh terminal

Ever wondered how nice it would be, to always know which git branch you’re current on, in a given directory? If so, then i encourage you to give Prezto — Instantly Awesome Zsh a try.


Git branch name in zsh terminal


You’ll find it here (as well as instruction on how to install):


Prezto integrates nicely with (among others):

iTerm2, SSH, Ruby, Git, various editors, etc.