我正在浏览Github的分叉指南:https://guides.github.com/activities/forking/ 我正在尝试将存储库克隆到我的计算机上。但是,执行以下命令:

$ git clone https://github.com/./Spoon-Knife.git
Cloning into 'Spoon-Knife'...
fatal: protocol 'https' is not supported

也尝试了SSH:

$ git clone git@github.com:./Spoon-Knife.git
Cloning into 'Spoon-Knife'...
Warning: Permanently added the RSA host key for IP address '.' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我需要改变我的计算机上的一些配置设置,或者这是一个问题与GitHub?

编辑:我已经用“”替换了我的用户名和IP地址。


当前回答

如果您正在使用Visual Studio或Git GUI进行克隆,则需要删除“Git clone”命令。只需要地址。

其他回答

我遇到了同样的问题,我所做的就是重新启动命令行,然后使用命令“cd documents”导航到文档文件夹,而不是用户文件夹。这应该是所有需要的。还要确保链接是正确的。

上传项目到github

git init
echo . > .gitignore
git commit -m "commit"
git remote add origin "https://github.com/anmolmishra99/Delhi-Flask-WebApp.git"
git remote -v
git pull origin master 
git push origin master

问题 git克隆https://github.com/rojarfast1991/TestGit.git 致命:不支持协议“https”

解决方案:

步骤:

(1):-打开新终端并克隆git存储库

Git 克隆 https://github.com/rojarfast1991/TestGit.git

(2) git自动登录提示将打开,并要求您输入用户凭证。

用户名:- xxxxxxx

密码:- xxxxxxx

最后,克隆将开始…

git clone https://github.com/rojarfast1991/TestGit.git
Cloning into 'TestGit'...
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (4/4), done.

问题可能是这样的。

你试着用

CTRL + v

之前,它没有工作,所以你继续粘贴它与经典

右击-粘贴**。

可悲的是,无论何时你在终端上输入CTRL + V,它都会添加

隐藏的^?

(至少在我的机器上是这样编码的)。

你这个角色只在你之后出现

退格

(继续尝试git bash)。

所以你的链接变成^?https://..。

无效。

只需使用双引号的URL,如:git克隆“https://yourRepoUrl”

(它不知何故看到你正在使用2引号开始,不知道为什么)。

我得到了相同的错误=>致命:协议“https”不受支持(你可以看到https上的2引号)。