无法通过 HTTPS 克隆私有 Github 存储库

2024-05-05

我在通过 HTTPS 克隆私有 GitHub 存储库时遇到问题。如果我尝试使用以下方式克隆我的存储库:

git clone https://github.com/{username}/{repository}

我收到错误:

fatal: remote error: Repository not found

当我尝试在请求中输入我的凭据时,如下所示:

git clone https://{username}@github.com/{username}/{repository}

我收到错误:

fatal: Unable to look up {username}@github.com (port 9418)

通过 ssh 进行克隆不需要。克隆公共存储库也可以通过 https 进行。有人知道我能做什么吗? 我正在使用 Windows 10 和 Windows 版本 2.14.13 的 git


您可以通过以下方式克隆您的存储库:

git clone https://[email protected] /cdn-cgi/l/email-protection/username/repo_name

它还可以帮助检查你的 git 配置:

git config -l
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法通过 HTTPS 克隆私有 Github 存储库 的相关文章

随机推荐