Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#Up to date doc can be found on
#First configure your local git configuration so it can communicate with your gitlab server :
# If you're on windows install git bash for windows if not install git
# This time i'm on windows so :
#Open a git bash command terminal (right click into any folder + git bash here)
#Generate a new ED25519 SSH key pair
#(as a best practice we should always prefer ED25519 to old rsa format)
#(as a best practice dont forget to add a strong passkey and save it in your keypass)
ssh-keygen -t ed25519 -C ""
#Clip the generated public key to copy it into your gitlab console
cat ~/.ssh/ | clip
#Open the gitlab console and Paste the clipped public key into your (Profile Menu > Settings > SSH Key > Key) + Add it
#in your git bash console run :
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_ed25519
#specify which ssh key to use for your gitlab
vi ~/.ssh/config
# Company GitLab instance (ensure is your gitlab url)
Preferredauthentications publickey
IdentityFile ~/.ssh/id_ed25519
#:wq(to save and quit vi)
#To verify that your local git can communicate with the gitlab server in ssh run :
#(ensure your gitlab url is
ssh -T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment