简体   繁体   English

Git错误403推送

[英]Git error 403 pushing

I am contributing in a repository. 我在一个存储库中贡献力量。 I can't push my code. 我无法推送我的代码。 Last week I pushed successfully my code, but today I can't. 上周,我成功地推送了我的代码,但是今天我不能。 When I try to push I have this message: 当我尝试推送时,出现以下消息:

Failed with error: fatal: unable to access ' https://github.com/Repository/Project.git/ ': The requested URL returned error: 403 失败,失败:致命:无法访问' https://github.com/Repository/Project.git/ ':请求的URL返回错误:403

I tried to change the .git/config archive in many ways, but nothing worked. 我试图以多种方式更改.git / config档案,但是没有任何效果。 I have also tried to push using Android Studio, the desktop GitHub client, tortoise git and cmd but nothing works. 我也尝试过使用Android Studio,桌面GitHub客户端,Tortoise git和cmd进行推送,但是没有任何效果。 I don't know what else to try. 我不知道还能尝试什么。

The error code 403 means Forbidden . 错误代码403表示“ 禁止” You have no access to that Git repository. 您无权访问该Git存储库。

Ask the maintainers of the repository to check your access. 要求存储库的维护者检查您的访问权限。 Maybe they recently removed your access. 也许他们最近删除了您的访问权限。

As you seem to push to an https:// URL, I suppose you have to enter your password. 当您似乎要推送到https:// URL时,我想您必须输入密码。 Make sure you got the password right. 确保您输入的密码正确无误。 As a sanity check, try to push to a repository that's under your account. 作为健全性检查,请尝试推送到您帐户下的存储库。 If that works, then the problem is the first: your access has been revoked. 如果可行,那么问题出在第一位:您的访问权限已被撤消。

I had a similar error. 我有一个类似的错误。 For my github account email verification was pending. 对于我的github帐户,电子邮件验证尚未完成。 Once Email verification was in place i was able to push my code to the repo. 电子邮件验证到位后,我便可以将我的代码推送到存储库中。

There can be other reasons why you are not able to access the git repo but if you have recently created your github account please check if there are any warnings being shown when you login to your github account. 可能还有其他原因导致您无法访问git repo,但是如果您最近创建了github帐户,请检查登录到github帐户时是否显示任何警告。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM