107

Recently I've been getting a popup when pushing or pulling from upstream

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?

I click Always allow, but it doesn't do anything. The only button that works is Deny, and then I have to enter in my github username and pw.

I used to be able to do all this automatically without this happening... how do I fix this?

WinchenzoMagnifico
  • 3,075
  • 5
  • 20
  • 23
  • 2
    If you open up the Keychain Access app, do a search for your git repository URI, you should see a keychain item for it. Double Click it and look at the "Access Control" tab. Is `get-credential-osxkeychain` listed? – vcsjones Nov 10 '15 at 18:19
  • 1
    I'm also having this issue. This is super frustrating. On the keychain entry the "git-credential-osxkeychain" is not listed. I've also tried going to the "Access Control" tab, and selecting the "Allow all applications to access this item", but it never takes my password (Yes, I'm sure it's the correct one). I've tried deleting the keychain entry a few times now, to no avail. Had anyone figured out why the only thing you can do is deny this pop up? – The Guardian Nov 18 '15 at 22:24
  • I've found this article on the developer form https://discussions.apple.com/thread/7305746. It says that the issue could be that you're remotting into your mac, so you're using a third party software, which changes where the O.S thinks your mouse clicker is. I currently don't have direct access to my machines at the moment, so I don't know if the first solution I gave is 100% correct or not. – The Guardian Nov 18 '15 at 23:03
  • Can you post a photo of the information contained in the `github.com` entry in Keychain Access.app? – houtanb Nov 24 '15 at 16:35
  • I'm experiencing the same issue and none of the solutions below work. Clicking always allow does nothing, and editing the key via the Access Control app prompts me to enter my Login keychain password. It is absolutely the correct password, but it is never accepted. I'm at a loss. I'm to the point where I'm contemplating reformatting the machine. Anyone have more advice? – mrbinky3000 Jan 23 '16 at 19:57
  • The "Deny" button works so the comment about "remoteing" into your Mac seems non-applicable. – cgseller Feb 22 '16 at 13:21
  • Could this be because the `git-credential-osxkeychain` application is not a signed executable? – user1480833 May 01 '22 at 08:34

8 Answers8

155

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 :)
Hlung
  • 13,850
  • 6
  • 71
  • 90
  • 1
    This solves the problem, but I had become accustomed to having the U/P in the keychain. How can we restore this behavior? – MichaelChirico Jun 20 '18 at 09:25
  • This sorted my issue, basically, the old keychain entry needed to be deleted for the sticky keychain pop ups to go away and git to work in the terminal again. Thanks. – Diego Duarte Aug 16 '22 at 07:36
  • The problem is that other applications will have the same issue with the same password or token. Like Obsidian – Hvaandres Dec 10 '22 at 06:58
152

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

afacat
  • 1,880
  • 1
  • 10
  • 8
4

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

nimish
  • 4,755
  • 3
  • 24
  • 34
4

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. :(

Community
  • 1
  • 1
cgseller
  • 3,875
  • 2
  • 19
  • 21
  • 1
    More information - I found that if you press the Allow button is selected and it works. If you mouse over to it - it will fail. My solution is not permanent so the suggestions above may be better. – cgseller Feb 26 '16 at 15:06
4

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.

David James
  • 2,430
  • 1
  • 26
  • 35
3

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.

GabeV
  • 859
  • 8
  • 21
0

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.

Gurudeepak
  • 372
  • 2
  • 14
0

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

Nicronaide
  • 61
  • 1
  • 6