Why, on my OSX 10.8.5 system, does git
(version 1.8.5.2/Apple Git-48) allow me to access https://github.com/...
URLs without challenging me for username/password, even though a credential.helper
is not in my git
configuration?
While it's true that my github.com username/password are in my OSX keychain, running
git config -l
shows only the following:
difftool.kdiff3.path=/Applications/kdiff3.app/Contents/MacOS/kdiff3
difftool.kdiff3.trustexitcode=false
difftool.prompt=false
diff.tool=kdiff3
mergetool.kdiff3.path=/Applications/kdiff3.app/Contents/MacOS/kdiff3
mergetool.kdiff3.trustexitcode=false
mergetool.keepbackup=false
merge.tool=kdiff3
i.e., no credential.helper
configured.
Yet I was able to clone a private repo (not owned by me, though my GitHub account has been made a member of the organization that owns it) using its https address, unaltered from how it appears on its GitHub page:
% git clone https://github.com/organization/project.git
i.e., no username or password interpolated into the URL.
I reviewed the other answers to this question as well, but none of them seem to apply to my situation, e.g., I don't have a .netrc
file, I'm not using ssh
, I`m not using GitHub auth tokens, etc.
I've seen other people waste lots of hours trying to figure out why git
is either doing something they don't want, or not doing something that they do want. It usually comes down to git
having too many obscure and partially-overlapping options that are impossible for most mortals to keep straight in their heads, or remember that they've enabled at some time in the past.
I suspect that I've either fallen into that kind of trap, or that there is some kind of OSX-specific magick going on under the covers that I'm not aware of -- like, I dunno, maybe Apple decided to be "helpful" and build keychain access into "Apple Git-48" without requiring the user to set up a credential helper.
(BTW, I considered asking this in the AskDifferent SE, but decided to ask it here instead, since I figured there are probably more git
power-users who happen to use OSX than there are OSX power-users who happen to use git
.)