[英]Getting error "fatal: unsafe repository" even though I AM the owner of it
Before asking this here, I put some thinking into it, and maybe that happens because I added another SSH key to my profile.在这里提出这个问题之前,我进行了一些思考,这可能是因为我在我的个人资料中添加了另一个 SSH 密钥。
I saw this error when I did git status
in a repository that I have created before I add another SSH key.当我在添加另一个 SSH 密钥之前创建的存储库中执行
git status
时,我看到了这个错误。
So, what can I do to tell "it" that I am the owner of the repository?那么,我该怎么做才能告诉“它”我是存储库的所有者?
The prompt, in case it is needed:提示,以防需要:
$ git status
fatal: unsafe repository ('C:/Users/#####/Desktop/workspace/DIO/Anotacoes' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory C:/Users/#####/Desktop/workspace/DIO/Anotacoes
maybe that happens because I added another SSH key to my profile.
这可能是因为我在我的个人资料中添加了另一个 SSH 密钥。
It should not be linked to SSH at all.它根本不应该链接到 SSH。
An SSH key is used to identify you on the remote server. SSH 密钥用于在远程服务器上识别您。
Your error message is because Git stops from accepting top-level directories owned by someone other than the current user .您的错误消息是因为Git 停止接受当前用户以外的其他人拥有的顶级目录。
Contexte: CVE-2022-24765上下文: CVE-2022-24765
You can define the GIT_CEILING_DIRECTORIES
environment variable to include your C:/Users/#####/Desktop/workspace/DIO/Anotacoes
folder.您可以定义
GIT_CEILING_DIRECTORIES
环境变量以包含您的C:/Users/#####/Desktop/workspace/DIO/Anotacoes
文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.