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


当前回答

简单的答案是删除https

你的回购。:(git克隆https://........)

(git克隆://.......)

再次输入(git克隆https://........)

其他回答

如果你正在使用Git Bash:

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

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

当我试图聪明地从回购的URL中提取克隆URL时,我得到了这个错误。我做错了。我正在做:

git@https://github.company.com/Project/Core-iOS

我必须这样做:

git@github.company.com:Project/Core-iOS.git

我犯了3个错误:

不需要https:// 在。com之后我需要:而不是/ 最后我需要一个。git

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

上传项目到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