-
Notifications
You must be signed in to change notification settings - Fork 169
Authentication on Windows
The following approach is recommended for git/github authentication on Windows:
- When cloning a repository from github, use "Clone with HTTPS" (do NOT use Clone with SSH).
- After cloning to your local machine, right click on the root directory and select "TortoiseGit / Settings / Git / Credential / Credential helper = wincred - this repository only".
- At the next push/pull-request with TortoiseGit, username and password of the github account are inquired once.
- For all follow-up requests, no user-name and password are inquired anymore.
If the above simple approach does not work, try the following:
-
The wincred credential helper utilizes a Windows service and stores usernames and passwords here (prefixed with "git:"):
English: Control Panel\User Accounts and Family Safety\Credential Manager. German: Systemsteuerung\Benutzerkonten\Anmeldeinformationsverwaltung
Delete all entries starting with "git:" and then redo steps 2-4 above.
-
Usernames containing a "@" may lead to errors (so the email address should not be selected as username in github).
A safer approach would be to use "Clone with SSH". Unfortunately, github has the severe restriction that every repository needs to have a unique ssh-key (so it is not possible to use the same ssh-key for more as one repository; if you have many repositories, ssh-keys are therefore no longer practical). Furthermore, building up an ssh infrastructure in a convenient way (on Windows) is a lot of work and a lot can go wrong (putty needs to be installed; with puttygen key-pairs generated, with pageant online utilization; the unique public key needs to be stored in the github repository settings, ...).