git - 无法通过 HTTPS 克隆私有(private) Github 存储库

标签 git github

我在通过 HTTPS 克隆私有(private) 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 进行克隆。克隆公共(public)存储库也适用于 https。有人知道我能做什么吗? 我正在使用 windows 10 和 git for windows version 2.14.13

最佳答案

您可以使用以下方法克隆您的存储库:

git clone https://username@github.com/username/repo_name

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

git config -l

关于git - 无法通过 HTTPS 克隆私有(private) Github 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46999328/

相关文章:

Git 在上游 master 上重新设置我的 fork 分支

git - 从 Git 中删除代码是否可以在需要时轻松将其恢复?

windows - Pycharm GitHub 'Push failed: fatal: Authentication failed'

git - 使用 arc diff 时如何更改默认分支?

git - 什么是 git 的广告引用?

git pull U、A 和 D 标签 : Meaning?

git - 如何将个人存储库正确添加到新创建的组织

java - 同一台机器上的 EGit 和多个 "users"

git - 是否可以对选项卡进行 git grep?

Git:如何提交手动删除的文件?