Git Fetch 在 Windows 中返回“致命:我不处理协议 https”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38807697/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Git Fetch returns 'fatal: I don't handle protocol https' in windows
提问by adi
Just after adding remote repo, I tried git fetch remoteRepoName
but it's returning this error:
添加远程仓库后,我尝试过,git fetch remoteRepoName
但返回此错误:
fatal: I don't handle protocol 'https'
fatal: I don't handle protocol 'https'
I explored relevant questions but most of these belongs to git clone
so their answers aren't working in my case. Here's a screenshot:
我探索了相关问题,但其中大部分属于,git clone
所以他们的答案在我的情况下不起作用。这是一个屏幕截图:
回答by
I can see extra spaces between forkgeek and https://... online 3.
我可以看到 forkgeek 和 https://... 在线 3 之间的额外空格。
Run these commands to fix it.
运行这些命令来修复它。
git remote remove forkgeek
git remote add upstream https://github.com/forkgeeks/aws-cloudwatch-keen-integration.git
git fetch upstream
I have changed forkgeek into upstream, you can have whatever name you want.
我已将 forkgeek 更改为上游,您可以使用任何名称。
回答by John Q
git config --local -e
This will open up the config file for the repo in Vim where you can delete the extra/special characters that cause this error.
这将在 Vim 中打开 repo 的配置文件,您可以在其中删除导致此错误的额外/特殊字符。
回答by christianbueno.1
if you have problems after run
如果您在运行后遇到问题
git push origin master
fatal: I don't handle protocol 'https'
Fix it removing that reference
修复它删除该引用
git remote rm origin
#then check is all worked well
git remote -v
Now you could add again the url for the remote repository
现在您可以再次添加远程存储库的 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
回答by Vijay
This issue could be with the invalid origin URL.
此问题可能与无效的源 URL 相关。
To check repo URL execute below command
要检查 repo URL,请执行以下命令
git remote -v
it will show the origin urls and then change with correct url. The below is the command for that.
它将显示原始网址,然后更改为正确的网址。以下是该命令。
git remote set-url origin https://github.com/**USERNAME/REPOSITORY**.git
again verify with the command
再次使用命令验证
git remote -v
for more information refer this link
有关更多信息,请参阅此链接
回答by Dr.Simplisist
I am new to git and I had a similar problem just now, the reason was that I tried to paste the link to my GitHub repository in the git bash using ctrl+V (I'm on windows) ad then ctrl+shift+v and when it didn't work I just wrote the link manually and when I ran the command it told me I don't handle https, and that's because ctrl+v was the special character they are speaking about in the answers above, so I restarted the bash and just typed in the link manually from the start and it worked, hope it helps.
我是 git 新手,刚才遇到了类似的问题,原因是我尝试使用 ctrl+V(我在 Windows 上)ad 然后 ctrl+shift+v 将链接粘贴到 git bash 中的 GitHub 存储库当它不起作用时,我只是手动编写链接,当我运行命令时,它告诉我我不处理 https,这是因为 ctrl+v 是他们在上面的答案中谈到的特殊字符,所以我重新启动 bash 并从一开始就手动输入链接,它起作用了,希望它有所帮助。
回答by naoufal zerai
git config --global http.sslVerify false
git config --global http.sslVerify false
回答by Michael
I had this same issue come up before but it was an easy fix, I had a space before my "https". Fixed that and worked like a charm.
我之前也遇到过同样的问题,但这是一个简单的解决方法,我在“https”之前有一个空格。解决了这个问题,就像一个魅力。
回答by prashant
Error is because of trailing space in your forgeek url, you can resolve it as
错误是因为您的 forgeek url 中的尾随空格,您可以将其解析为
git pull https://github.com/forkgeeks/aws-cloudwatch-keen-integration.git master