From 0e0531154e927ed84b6200870ad0c945a8dac7fe Mon Sep 17 00:00:00 2001 From: Johan Date: Wed, 8 Mar 2023 09:31:36 +0100 Subject: [PATCH] Update Git cheat sheet --- Git cheat sheet.md | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Git cheat sheet.md b/Git cheat sheet.md index a09bae2..ec5fc51 100644 --- a/Git cheat sheet.md +++ b/Git cheat sheet.md @@ -65,16 +65,28 @@ Eller för en hel katalog (rekursivt) ## Autentisering -#### Skapa ny privat SSH nyckel +### Linux + +* Skapa ny SSH nyckel ssh-keygen -t rsa -b 4096 Alternativt lägg till -C "<user@domain.com>" +* Lägg till id_rsa.pub som SSH-nyckel för repot + +* Sätt remote repo till git@... istället för https:// ... + +* Gör en pull för att verifiera att allt fungerar + #### Aktivera credential store +Alternativt aktivera credential.helper store. Observera att detta sparar inloggningsinformation i klartext i ~/.git-credentials +
git config --global credential.helper store
+### Windows + #### Aktivera Windows Credentials manager
git config --global credential.helper manager
@@ -82,4 +94,4 @@ git config --list
#### Kontrollera användarinformation lagrad i Windows Credentials manager -rundll32.exe keymgr.dll,KRShowKeyMgr \ No newline at end of file +rundll32.exe keymgr.dll,KRShowKeyMgr