无法点击总是允许 git-credential-osxkeychain 弹出窗口

最近,当我从上游推或拉的时候,我就会弹出一个窗口

git-credential-osxkeychain wants to use your confidential information stored in "github.com" in your keychain.


The authenticity of "git-credential-osxkeychain" cannot be verified.
Do you want to allow access to this item?

我点击总是允许,但它没有做任何事情。唯一有效的按钮是 Deny,然后我必须输入我的 github 用户名,。

我以前可以自动做到这一切,而不会发生这种情况... 我该怎么补救?

56010 次浏览

Delete the entry corresponding to git-credential-osxkeychain in Keychain Access and re-enter your credentials to get it working.

This fixed the issue for me:

  • Open Keychain Access
  • Select Keychains -> login and Category -> Passwords
  • Type github.com in search box, you should see an entry (or entries) of Internet Password kind for github.com. Right click & Delete them.
  • Go back to terminal and retry the git command that requires the password
  • Type in your git username and password when prompted
  • Done :)

This appears to have been an issue with MagicPrefs. I quit MagicPrefs and my symptoms have disappeared.

(ref: https://apple.stackexchange.com/questions/208704/os-x-10-11-unable-to-press-allow-on-keychain-access-dialogs )

-- original answer below for posterity -- I found that this occurs with some sort of failure with Keychain Access. The reason I say that is because I also had the problem clicking the button Allow or Always Allow (but not Deny) when changing another aspect of Keychain.

authd.log file shows "Succeeded.." for what appears to be each time I pressed Accept it however the modal dialog box does not disappear.

Solution for me: Restart, did not have to re-enter my credentials like the solutions above. :(

For SourceTree users, try downgrading Git to system Git, via SourceTree > Preferences > Git > Use System Git.

According to this report SourceTree 2.2 uses Git 2.6.4 which is causing the bug.

You should enter password of your user(mac login password), but not git password.

I fixed this but in a somewhat insecure way because none of the other proposed solutions worked for me.

  • Open Keychain Access.
  • Search for the github.com Internet Password entry and double click it.
  • Go to the Access Control tab and change it to Allow all applications to access this item.
  • Save changes.

You should no longer get prompted by xcodebuild.

It's a simple problem to solve.

Just delete the git entry from the Keychain access and run some git command on terminal, It'll ask you to enter the git password, just enter the password. Thats' all.

I had this issue when using the Fork git client application. There was an alert with the following:

“git-credential-osxkeychain” cannot be opened because the developer cannot be verified.

I deleted the login password for Fork in Keychain Access, which didn't work.

Next time I pushed to a repo, I got the same alert as above then chose to "Move to Trash". At this point I was given the auth prompt.

Successfully logged in, then got another error to push to elevate my PAT permissions to include the workflow permission.

TL;DR - choose the Move to Trash button from the prompt