11

Just after adding remote repo, I tried git fetch remoteRepoName but it's returning this error:

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:

enter image description here

Adil
  • 21,278
  • 7
  • 27
  • 54

9 Answers9

17

I can see extra spaces between forkgeek and https://... online 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.

7
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.

Paul Roub
  • 36,322
  • 27
  • 84
  • 93
John Q
  • 71
  • 1
  • 1
5

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

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
christianbueno.1
  • 516
  • 1
  • 8
  • 12
3

This issue could be with the invalid origin URL.

To check repo URL execute below command

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

https://help.github.com/articles/changing-a-remote-s-url/

Vijay
  • 311
  • 3
  • 10
1

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.

Dr.Simplisist
  • 675
  • 1
  • 8
  • 16
1

git config --global http.sslVerify false

ascripter
  • 5,665
  • 12
  • 45
  • 68
0

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.

Michael
  • 3
  • 1
0

Error is because of trailing space in your forgeek url, you can resolve it as

git pull https://github.com/forkgeeks/aws-cloudwatch-keen-integration.git master
prashant
  • 2,808
  • 5
  • 26
  • 41
0

I had the same issue when I do ctrl + v the right click and past the link, when I tried again just with the right click and past it works

  • just for information: ctrl+insert and shift+insert on bash does the same task as ctrl+c and ctrl+v on windows. – ganjaam May 03 '21 at 04:32