【问题标题】:General "git-credential-libsecret not found" error一般“未找到 git-credential-libsecret”错误
【发布时间】:2018-04-15 14:13:15
【问题描述】:

git repo 没有启用 LFS,但我准备 git 在另一个克隆中使用,所以使用 git config --global credential.helper 这似乎是问题的原因。

貌似the same problem here,但我使用的是更新的git (v2.17.0),所以不是版本问题。

例子:简单的git pull之后的消息是

/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 1: 
/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret get: 
 /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret: 
 not found

注意事项

没有git-credential-libsecret文件,

sudo ls /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
ls: cannot access '/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret': No such file or directory

【问题讨论】:

    标签: git credentials


    【解决方案1】:

    首先,确保了解该设置的来源

    git config --show-origin -l
    

    然后你可以取消它。
    例如:

    git config --global --unset credential.helper
    

    清理完情况后,您可以重新安装libsecret,如“How to bake credential into docker image for git?”中所述。

    【讨论】:

    • 是的,解决了基本问题(!)...但是如何再次使用credential.helper?我丢失了我的凭证,需要做些什么吗? PS:在--unset --show-origin 丢失文件 credential.helper=/usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret 行之后>/root/.gitconfig.
    • 感谢第二个链接的apt 提供帮助,看来一切都恢复正常了。
    • @PeterKrauss 太好了,干得好!我已经编辑了答案以使该步骤更加明显。
    猜你喜欢
    • 1970-01-01
    • 2017-01-23
    • 1970-01-01
    • 2012-11-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-07
    • 2012-10-08
    相关资源
    最近更新 更多