Skip to content

Commit a4a9103

Browse files
authored
Merge pull request PowerShell#1338 from PowerShell/vors/git-auth
Update auth docs for git
2 parents 7aa5304 + 2220692 commit a4a9103

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

docs/git/basics.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ Git.
5757
Authentication
5858
--------------
5959

60+
#### Windows
61+
On Windows, the best way to use git securely is [Git Credential Manager for Windows][manager].
62+
It's included in the official git installer for windows.
63+
64+
#### Linux and OS X
65+
6066
If you do not have a preferred method of authentication, enable the storage
6167
credential helper, which will cache your credentials in plaintext on your
6268
system, so use a [token][].
@@ -65,9 +71,16 @@ system, so use a [token][].
6571
git config --global credential.helper store
6672
```
6773

68-
Alternatively, on Windows, you can try the
69-
[Git Credential Manager for Windows][manager].
74+
Alternatively, you can use [ssh key][].
75+
In this case, you may want to use git-ssh even for https git urls.
76+
It will help you to use submodules transparently.
77+
78+
```
79+
git config --global url.git@github.com:.insteadOf https://github.com/
80+
```
81+
7082

83+
[ssh key]: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#generating-a-new-ssh-key
7184
[token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/
7285
[manager]: https://github.com/Microsoft/Git-Credential-Manager-for-Windows
7386

0 commit comments

Comments
 (0)