Github 克隆:403 访问信息/参考时禁止访问

问题描述 投票:0回答:2

我正在将一个私有存储库克隆到 AWS 盒子中,以使其做好生产准备。

git clone https://github.com/org_name/project_name.git

它返回给我这个错误:

Initialized empty Git repository in /home/pgupta/project-annie/.git/
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/org_name/project_name.git.git/info/refs

fatal: HTTP request failed

我不确定这里出了什么问题。

git github http-status-code-403
2个回答
0
投票

我通过使用 SSH 克隆来让它工作。步骤如下:https://help.github.com/articles/which-remote-url-should-i-use/

Generate ssh key pair using the instructions given above
copy the ssh url from github repo
git clone url

或者,您也可以在这里找到问题的解决方案:https://stackoverflow.com/a/12538716/3413239


-5
投票

我认为这只是因为你的网址末尾有一个额外的“.git”。

© www.soinside.com 2019 - 2024. All rights reserved.