Update Git cheat sheet
This commit is contained in:
parent
17fa4f70fb
commit
0e0531154e
@ -65,16 +65,28 @@ Eller för en hel katalog (rekursivt)
|
|||||||
|
|
||||||
## Autentisering
|
## Autentisering
|
||||||
|
|
||||||
#### Skapa ny privat SSH nyckel
|
### Linux
|
||||||
|
|
||||||
|
* Skapa ny SSH nyckel
|
||||||
|
|
||||||
<code>ssh-keygen -t rsa -b 4096</code>
|
<code>ssh-keygen -t rsa -b 4096</code>
|
||||||
|
|
||||||
Alternativt lägg till <code>-C "<user@domain.com>"</code>
|
Alternativt lägg till <code>-C "<user@domain.com>"</code>
|
||||||
|
|
||||||
|
* 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
|
#### Aktivera credential store
|
||||||
|
|
||||||
|
Alternativt aktivera credential.helper store. Observera att detta sparar inloggningsinformation i klartext i ~/.git-credentials
|
||||||
|
|
||||||
<pre><code>git config --global credential.helper store</code></pre>
|
<pre><code>git config --global credential.helper store</code></pre>
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
#### Aktivera Windows Credentials manager
|
#### Aktivera Windows Credentials manager
|
||||||
|
|
||||||
<pre><code>git config --global credential.helper manager
|
<pre><code>git config --global credential.helper manager
|
||||||
@ -82,4 +94,4 @@ git config --list</code></pre>
|
|||||||
|
|
||||||
#### Kontrollera användarinformation lagrad i Windows Credentials manager
|
#### Kontrollera användarinformation lagrad i Windows Credentials manager
|
||||||
|
|
||||||
<code>rundll32.exe keymgr.dll,KRShowKeyMgr</code>
|
<code>rundll32.exe keymgr.dll,KRShowKeyMgr</code>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user