fatal: protocol 'https' is not supported

14,520

Solution 1

Try removing the origin via

git remote remove origin

and adding the origin again via

git remote add origin https://github.com/YourUsername/YourRepo.git

It worked for me, when i encountered the exact same problem, since my orgin was corrupted.

Using gitbash, git remote -v didn't show anything unusual. But using the Win10 cmd.exe git remote -v showed me an additional character just right before the https://github.com/...

I think this extra character might came along by copy-pasting the link from github into gitbash.

I didnt need to re-install git

Solution 2

It could be that when you installed git on your local machine you didn't choose "Use the native windows secure channel library"

I had this issue too and after i removed git and installed with native windows library it worked

enter image description here

Share:
14,520
Admin
Author by

Admin

Updated on July 21, 2022

Comments

  • Admin
    Admin almost 2 years

    Getting this error whenever I'm running the command git push -u origin master after commits and adding the origin. How to solve this?

    enter image description here

  • Nathaniel
    Nathaniel almost 5 years
    This answer worked for me, and resolved the same error which occurred during a call of git clone.