3

All my credentials are in .gitconfig -

─[$] cat .gitconfig

     1  [user]
     2      name = Shirish Agarwal
     3      email = xxxxx@xxx.com
     4  [core]
     5      editor = leafpad
     6      excludesfiles = /home/shirish/.gitignore
     7      gitproxy = \"ssh\" for gitorious.org
     8  [merge]
     9      tool = meld
    10  [push]
    11      default = simple
    12  [color]
    13      ui = true
    14      status = auto
    15      branch = auto

Now I see this https://help.github.com/articles/caching-your-github-password-in-git/ . Is there any gain by shifting to git-credential-helper or is it something which benefits ONLY if you are on github.com ?

shirish
  • 477
  • 1
  • 4
  • 12
  • 1
    The `.gitconfig` entries you show here are not *credentials*: the `user.name` and `user.email` settings are what Git uses when creating commits but are not passed through either ssh or https. The `core.gitproxy` setting affects `git://` connections (see http://stackoverflow.com/q/5860888/1256452). As mattliu answered, `ssh://` uses its own credential system, ignoring Git entirely, and `https://` uses credentials. – torek Jan 22 '17 at 20:49

1 Answers1

1

You appear to be connecting to your remote git repo using SSH. In your case, you won't be needing to use git-credential-helper.

Note that in the Github doc that you linked, it says:

If you clone GitHub repositories using SSH, then you authenticate using SSH keys instead of a username and password.

This applies to git repos outside of Github as well.

If you were not connecting via SSH, you'd be asked to enter your password every time you fetch or push.

git-credential-helper helps keeps your password for you so you don't have to type it in every time. On OSX/macOS, osxkeychain stores the password in the OS keychain. I'm not familiar how it works on other operating systems.

mattliu
  • 823
  • 12
  • 28