madhav aneja
madhav aneja

Reputation: 101

fatal: protocol 'https' is not supported

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

Upvotes: 10

Views: 24946

Answers (3)

Pulseczar
Pulseczar

Reputation: 150

I encountered the error message when trying to clone a repository. It did it on both HTTP and HTTPS addresses.

Just reinstalling Git on Windows 10 fixed the problem for me. I continued to use the OpenSSL library, which was the default option. I did not use the "native Windows Secure Channel library". I only changed 1 or 2 of the default options during installation, which should have been options having nothing to do with the problem we were experiencing. (One thing I did was have Git not change line-endings at all when committing/pushing. The default was to have it always change to UNIX line-endings when committing/pushing. I want complete control over this.)

After reinstalling, I tried cloning the same repository again, using HTTPS (github.com), and this time it worked fine. Quick and simple fix and uses less Windows stuff (i.e., no Windows Secure Channel library).

Upvotes: 0

Huegelkoenig
Huegelkoenig

Reputation: 146

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

Upvotes: 11

VLados
VLados

Reputation: 41

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

Upvotes: 1

Related Questions