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