From 22206923944f20b5458e52640ea29704c3b9b059 Mon Sep 17 00:00:00 2001 From: Sergei Vorobev Date: Tue, 12 Jul 2016 12:53:15 -0700 Subject: [PATCH] Update auth docs for git --- docs/git/basics.md | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/git/basics.md b/docs/git/basics.md index 1ac5f7a853..3b903af5a0 100644 --- a/docs/git/basics.md +++ b/docs/git/basics.md @@ -57,6 +57,12 @@ Git. Authentication -------------- +#### Windows +On Windows, the best way to use git securely is [Git Credential Manager for Windows][manager]. +It's included in the official git installer for windows. + +#### Linux and OS X + If you do not have a preferred method of authentication, enable the storage credential helper, which will cache your credentials in plaintext on your system, so use a [token][]. @@ -65,9 +71,16 @@ system, so use a [token][]. git config --global credential.helper store ``` -Alternatively, on Windows, you can try the -[Git Credential Manager for Windows][manager]. +Alternatively, you can use [ssh key][]. +In this case, you may want to use git-ssh even for https git urls. +It will help you to use submodules transparently. +``` +git config --global url.git@github.com:.insteadOf https://github.com/ +``` + + +[ssh key]: https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#generating-a-new-ssh-key [token]: https://help.github.com/articles/creating-an-access-token-for-command-line-use/ [manager]: https://github.com/Microsoft/Git-Credential-Manager-for-Windows