gpt4 book ai didi

git - 如何禁用 Git 上的公钥权限检查?

转载 作者:太空狗 更新时间:2023-10-29 14:16:57 26 4
gpt4 key购买 nike

我正在使用 SSH key 对连接到我的 Git 存储库。

此 key 存储在外部加密卷上。它很酷也很安全,但它对权限管理支持得不好。我的 key 具有 644 权限,并且 git 向我发送了太开放的错误:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for '***' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
key_load_private_type: bad permissions
Permission denied (publickey).
fatal: Could not read from remote repository.

有没有办法禁用此权限检查以及如何禁用?

最佳答案

这取决于卷的性质和操作系统。
但首先:

Is there a way to disable this permission check and how ?

没有,没有。

您可以在“Bypass ssh key file permission check”中看到通过 /etc/fstab(2009 年)在 OSX 上挂载加密卷(当时为 TrueCrypt)的示例。
现在(2017),/etc/fstab seems to be still around并添加正确的选项(参见 wiki.archlinux.org/fstab )应该允许查看具有正确权限的那些文件。

关于git - 如何禁用 Git 上的公钥权限检查?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46979654/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com