错误:请求的URL返回错误:403访问时禁止访问

Ani*_*kur 7 git android github

我有一个git 存储库.我在Windows中有一个GUI客户端,在Eclipse ADT中有一个EGit.通常我在Eclipse ADT中编辑并使用GUI Client更新Github仓库.首先我提交(创建一个缓冲区)然后当我同步它时将它上传到我的实际仓库.

现在我在Linux(CentOS 6.4)上克隆了我的repo.一切都准备好了.我换了一些文件.然后我使用git addgit commit -m "message" -a命令它工作正常.但我的实际github回购没有更新.经过一段谷歌搜索后,我发现我们必须明确提供git push命令.之后我得到了

[aniket@localhost Android]$ git push
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/aniket91/Android.git/info/refs

fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)

出了什么问题?没有防火墙或代理,我靠近iptables服务.有没有人遇到过这种情况?应该做什么?

在听完这个答案后(哪种工作我得到了以下错误)

[aniket@localhost Android]$ git push origin master
The authenticity of host 'github.com (192.30.252.130)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.130' (RSA) to the list of known hosts.
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

任何建议表示赞赏.

Von*_*onC 3

您提到的答案建议将网址从 https 更改为 ssh 。

~/.ssh/id_rsa仅当您有和~/.ssh/id_rsa.pub,并且后者(公钥)在您的GitHub ssh 密钥中发布时,这才有效。

检查您的Egit ssh 配置

http://wiki.eclipse.org/images/8/87/Egit-0.6-003-SshPreferences.png

有关如何生成 SSH 密钥并在 GitHub 设置中设置它的分步过程,请参阅此处的链接。