gpt4 book ai didi

Git push origin 对 * 的权限被拒绝致命 : Could not read from remote repository

转载 作者:太空狗 更新时间:2023-10-29 13:46:30 27 4
gpt4 key购买 nike

所以我将我的公共(public) ssh key 添加到 git 存储库中。我已将私钥添加到我的/c/Users/totty/.ssh/。

当我运行 ssh -vT git@github.com 时,它显示 Hi X!您已成功通过身份验证,但 GitHub 不提供 shell 访问。

当我运行 git push origin 时,我得到 Permission to * denied fatal: Could not read from remote repository

这个github有什么问题?我无法从 cmd、git 扩展推送。但它适用于 Windows 的 github...

在我删除我的 ssh key 并运行 ssh -vT git@github.com 之后,我得到了 debug1: No more authentication methods to try.


还有一件很奇怪的事情……如果你看一下带圆圈的文字,那不是我的用户名或电子邮件地址。我什至检查了我的 git 配置,但无处可去。从哪里来?我是说 gs11118

enter image description here

最佳答案

首先,用户名/邮箱(你用 git config user.name/user.email 设置的)与 GitHub 凭据无关(用户 GitHub账户名)

其次,确保您的 git push 实际上使用的是 SSH URL:

cd /path/to/my/local/repo
git remote -v

如果您看到一个 URL 以 https://... 开头,那么 ssh -T git@github.com 是否正确识别您并不重要: Git 不会将其用作凭据。它将使用存储在 Windows Credentials Manager 中的内容。 .

关于Git push origin 对 * 的权限被拒绝致命 : Could not read from remote repository,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50995898/

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