[英]fatal: unable to access 'https://github.com/MyName/MyRepo.git/': The requested URL returned error: 403
[英]fatal: unable to access 'https://github.com/usename/my-project.git/': The requested URL returned error: 403 Mac
我尝试从命令行推送现有存储库,我按照下面的 git 集线器步骤操作,看起来 github 将 master 更改为 main。
…or push an existing repository from the command line git remote add origin git@github.com:username/my-project.git git branch -M main git push -u origin main
我阅读了 window 用户解决错误 403 的解决方案;
我正在使用 Mac 笔记本电脑,我的系统上没有控制面板,我也没有看到凭据管理。 我的 ssh 密钥成功连接到 github。
403 表示禁止,这意味着您已通过身份验证但没有执行该操作的权限。 这可能有几个原因:
请注意,您在这里使用的是 HTTPS。 If you want to use SSH, then you need to use an SSH URL by changing the remote like so: git remote set-url origin git@github.com:usename/my-project.git
.
如果您想重置您的 HTTPS 凭证, Git 常见问题解答说明了如何执行此操作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.