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


当前回答

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

其他回答

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

简单的答案是删除https

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

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

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

只需添加这个git配置——global http。sslVerify为false,这样它就不会检查证书。

在我全新的Ubuntu服务器上也有同样的问题,然后我意识到我的系统上没有安装网络工具。

首先运行sudo apt install net-tools 然后更新你的系统sudo apt update

现在尝试使用nginx打开80端口,可以使用sudo apt install nginx安装,并使用sudo ufw allow ' nginx HTTP'打开80端口。

同样的端口8080 https运行sudo ufw允许'Nginx https '

尝试重新启动您的系统,现在尝试克隆回购。

问题可能是这样的。

你试着用

CTRL + v

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

右击-粘贴**。

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

隐藏的^?

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

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

退格

(继续尝试git bash)。

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

无效。