简体   繁体   English

Git Bash钥匙串-凭证已损坏

[英]Git bash keychain - broken credentials

I have multiple users on my Macbook running High Sierra (personal/work) and have been screwing around with my .bash_profile and homebrew settings on my "work" user for a certain issue, which I was able to resolve. 我的Macbook上有多个用户正在运行High Sierra(个人/工作),并且一直在解决“工作”用户上的.bash_profilehomebrew设置问题,因此可以解决。

Unfortunately, when switched back over to my personal user, my git credentials keychain seems to have broken. 不幸的是,当切换回我的个人用户时,我的git凭证钥匙串似乎已损坏。

When I attempt to push or pull from my Github, I get the following error from git. 当我尝试从Github推入或拉出时,我从git中收到以下错误。

cannot exec 'git-credential-osxkeychain': Permission denied

I am prompted to enter my Username and Password every time I push or pull from the remote, which is tedious. 每当我从遥控器上推或拉时,都会提示我输入用户名和密码,这很繁琐。

My .gitconfig looks like this: 我的.gitconfig看起来像这样:

[filter "lfs"]
    clean = git-lfs clean -- %f
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true
[user]
    name = yev
    email = yev@internet.website
[color]
    ui = true
[credential]
    helper = osxkeychain

I also attempted to add the following to my .profile file: 我还尝试将以下内容添加到我的.profile文件中:

export PATH=${PATH}:$(git --exec-path)

This did not help. 这没有帮助。

Does anyone know where git-credential-osxkeychain is or is supposed to be located and/or how to restore these credentials. 有谁知道git-credential-osxkeychain位置或应该位于的位置和/或如何还原这些凭据。

For anyone having this issue, updating git with homebrew and overwriting the symlink resolved it. 对于任何遇到此问题的人,使用自制软件更新git并覆盖符号链接即可解决该问题。

brew install git

brew link --force git

brew link --overwrite git

After restarting the terminal, keychain was restored! 重新启动终端后,钥匙串已还原!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM