简体   繁体   English

即使我是它的所有者,也会出现错误“致命:不安全的存储库”

[英]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.

相关问题 即使我是项目所有者,GitLab 也拒绝推动掌握 - GitLab refuses push to master even though I am the project owner 为什么我会致命:文件来自Jenkins的存储库 - Why am I getting fatal: file is outside repository from Jenkins 致命错误“不安全的存储库('/home/repon' 归其他人所有)” - Fatal error "unsafe repository ('/home/repon' is owned by someone else)" 为什么我收到错误“致命:'C:/ Program Files(x86)/ Git'在存储库外”当我从存储库中运行“git reset --hard~1”时? - Why am I getting error “fatal: 'C:/Program Files (x86)/Git' is outside the repository” when I run “git reset --hard ~1” from within the repository? 为什么在 git 工作树中查找顶级目录时会出现“fatal: not a git repository...”? - Why am I getting `fatal: not a git repository...` when looking up toplevel dir in a git worktree? 当我在git命令提示符下键入“ git add”时,收到致命消息,即不是git存储库。 - I am getting fatal message i.e not a git repository, when I am typing “git add .” in git command prompt. 如何签署我不是所有者的 Github 存储库的提交? - How to sign my commits to Github repository where I am not the owner? 致命:不安全的存储库('/azerothcore' 由其他人拥有) - fatal: unsafe repository ('/azerothcore' is owned by someone else) 即使我使用相同的用户名和 email,也会出现错误“远程:错误:GH007” - Error “remote: error: GH007” even though I am using the same username and email git 推送错误:即使添加了远程 url 也找不到存储库 - git push error: repository not found even though remote url is added
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM