I must be able to execute Git commands in two contexts:
Everything works perfectly except for push/pull operations, where there is a credential helper issue. With the default GitHub setup, which uses helper = !github –credentials
in etc/.gitconfig
, remote ops work fine for context 1 but not context 2 (it asks for credentials every time). If I add helper = wincred
to user/.gitconfig
, then context 1 works fine and context 2 works fine though it first complains:
github --credentials get: github: command not found
github --credentials store: github: command not found
(I assume it complains because it’s trying to use the GitHub helper but can’t in context 2) but then proceeds to execute the push:
Counting objects: 11, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (5/5), 467 bytes | 0 bytes/s, done.
Total 5 (delta 1), reused 0 (delta 0)
...
I could live with the complaint, but the problem is that whenever GitHub for Windows is started, it removes helper = wincred
from user/.gitconfig
.
The question is this: can I either
To update your credentials, go to Control Panel -> Credential Manager -> Generic Credentials. Find the credentials related to your git account and edit them to use the updated passwords as per the image below: I hope this helps with your Git issues.
You can avoid being prompted for your password by configuring Git to cache your credentials for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.
Just prefix the origin path with your username and @, like so: [email protected]/repo/reporepo. git This allows the Windows credential manager to store multiple logins.
I had a similar issue and contacted GitHub support and got this reply:
What you're hitting is a configuration sanitizer which GitHub for Windows runs on startup. We've seen significant issues in the past with other Git clients adding invalid/bad configuration values into this file and giving users a bad experience - so we had to take steps to mitigate these issues.
This is opt-in, and you can bypass this by running the following command:
git config --global ghfw.disableverification true
This fixed my issue
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With