无法通过HTTPS克隆私有Github存储库 [英] Can't clone private Github repositories over HTTPS

查看:398
本文介绍了无法通过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

这篇关于无法通过HTTPS克隆私有Github存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆