Git Fetch在Windows中返回'致命:我不处理协议https'

adi*_*adi 10 windows git github git-fetch

刚添加远程仓库后,我尝试了git fetch remoteRepoName但是它返回了这个错误:

fatal: I don't handle protocol 'https'

我探讨了相关的问题,但其中大部分属于git clone这样,所以他们的答案在我的案例中不起作用.这是一个截图:

在此输入图像描述

小智 14

我可以在forkgeek和https:// ... online 3之间看到额外的空格.

运行这些命令来修复它.

git remote remove forkgeek

git remote add upstream https://github.com/forkgeeks/aws-cloudwatch-keen-integration.git

git fetch upstream
Run Code Online (Sandbox Code Playgroud)

我已将forkgeek更改为上游,您可以拥有任何您想要的名称.


小智 6

git config --local -e
Run Code Online (Sandbox Code Playgroud)

这将打开Vim中repo的配置文件,您可以删除导致此错误的额外/特殊字符.


chr*_*o.1 5

如果跑步后有问题

git push origin master
fatal: I don't handle protocol 'https'
Run Code Online (Sandbox Code Playgroud)


修复它删除该引用

git remote rm origin
#then check is all worked well
git remote -v
Run Code Online (Sandbox Code Playgroud)

现在您可以再次添加远程存储库的URL

git remote add origin https://example.com/user/repo.git
#and check
git remote -v
#And push the changes in your local repository to github
git push origin master
Run Code Online (Sandbox Code Playgroud)