'git-credential-osxkeychain wants to access key "github.com" in your keychain

In line with the github recently removing support for password authentication - I have created a PAT following this guide

However, everytime I git push I see that that the "authencity of git-credential-osxkeychain cannot be verified.

Why this? Surely I don't need to enter my password everytime I push?

enter image description here

git


Solution 1:[1]

OSX prompts for a password every time you use git after brew upgrades git. To make Keychain Access trust git with the password again, you have to open Keychain Access, search for github under Keychain: login, kind: Internet password, and add the new path to git-credential-osxkeychain. Or, just delete the github password and regenerate the Personal Access Token again. (source: Fixing the git-credential-osxkeychain password prompts on every git transaction )

For example, today brew installed git-credential-osxkeychain to /usr/local/Cellar/git/2.36.0/libexec/git-core/git-credential-osxkeychain, so I had to add that path to the password in Keychain Access.

$ brew info git
…
/usr/local/Cellar/git/2.36.0 (1,544 files, 43.6MB) *
…
$ find /usr/local/Cellar/git/2.36.0 -name git-credential-osxkeychain
/usr/local/Cellar/git/2.36.0/libexec/git-core/git-credential-osxkeychain

Screenshot of password window in Keychain Access

Solution 2:[2]

You can enter your password and click “Always Allow,” which should avoid you needing to enter the password again.

The likely reason for this is that your version of Git comes from Homebrew or another source that doesn't sign its packages, and Apple is complaining about this. As far as I'm aware, nobody but Apple ships a version of Git that's signed, and Homebrew is considered reputable, so there's no reason to be worried here. The notification is unnecessary.

Solution 3:[3]

https cloning has always been fraught with peril and you'll see issues like this .. additionally, Microsoft Corporation (who acquired GitHub in 2018) is attempting to frustrate you into using their command line tool by both hiding ssh clone and only appearing to offer clone via https or their command line tool

See Embrace, Extend, and Extinguish

Create ssh keys and clone via ssh instead of https

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 yonran
Solution 2 bk2204
Solution 3