无法通过HTTPS克隆私有Github存储库
问题描述:
我在通过HTTPS克隆私有GitHub存储库时遇到问题.如果我尝试使用以下方法克隆我的存储库:
I have problems cloning private GitHub Repositories over HTTPS. If i try to clone my repository using:
git clone https://github.com/{username}/{repository}
我得到了错误:
fatal: remote error: Repository not found
当我尝试在请求中输入我的凭据时,如下所示:
when i try to enter my credentials in the request like this:
git clone https://{username}@github.com/{username}/{repository}
我得到了错误:
fatal: Unable to look up {username}@github.com (port 9418)
克隆ssh可以不使用.克隆公共存储库也可以通过https进行.有人知道我能做什么吗? 我正在使用Windows 10和git for Windows 2.14.13
Cloning over ssh works without. Cloning public repositories also works over https. Does anybody know what i could do? I'm using windows 10 and git for windows version 2.14.13
答
您可以使用以下方法克隆存储库:
You can clone your repository with:
git clone https://username@github.com/username/repo_name
它还可以帮助您检查git的配置:
It can also help to check your git configuration with:
git config -l