Configure Git clients, like GitHub for Windows, to not ask for authentication

prongs picture prongs · Dec 10, 2012 · Viewed 31.1k times · Source

I have installed GitHub for Windows and also GitExtensions and have multiple versions of git.exe in my path.

enter image description here

C:\Users\Rajat\AppData\Local\GitHub\PortableGit_93e8418133eb85e81a81e5e19c272776524496c6\cmd\git.exe
C:\Users\Rajat\AppData\Local\GitHub\PortableGit_93e8418133eb85e81a81e5e19c272776524496c6\bin\git.exe
E:\cygwin\bin\git.exe
C:\Program Files (x86)\Git\cmd\git.exe
C:\Program Files (x86)\Git\bin\git.exe

Now, when I do git push origin master with any of the last three git.exes, it asks for my username. But the Portable Git doesn't ask for username. See the following screenshot:

enter image description here

The heart-shaped character is just a ^C so ignore that.

How is authentication being taken care of in this case? Ultimately I want the last three Gits to not ask for authorization. How's that possible?

I found two extra files in the GitHub's Git but I doubt they matter at all:

enter image description here

Answer

Ana Betts picture Ana Betts · Apr 11, 2014

If you're using GitHub for Windows, all you need to do is:

  1. Make sure you've logged into the GUI app at least once
  2. Click the "Git Shell" link

GitHub has already solved this problem for you on the command line, for both HTTPS and SSH-based remotes