我正在浏览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地址。


当前回答

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

其他回答

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

我刚在Windows 10上安装git并第一次运行它时遇到了同样的问题。重新启动bash窗口就解决了这个问题。

从普通记事本复制:

git clone https://github.com/./Spoon-Knife.git

然后在cmd中粘贴。

如果你正在使用Git Bash:

不要按Ctrl + V粘贴链接。 你可以输入git clone,点击右键,然后粘贴。

我尝试了很多方法来解决这个问题。但是我一次又一次的失败。然后我这样做了:

打开Git Bash >,到你的目录>,粘贴Git克隆https://shahadat@bitbucket.org/*******.git后,将显示一个命令提示符,提供登录凭据。提供凭证并克隆您的项目。