Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git fatal: protocol 'https' is not supported

Tags:

git

git-bash

I am going through Github's forking guide: https://guides.github.com/activities/forking/ and I am trying to clone the repository onto my computer. However, running the command:

$ git clone https://github.com/./Spoon-Knife.git Cloning into 'Spoon-Knife'... fatal: protocol 'https' is not supported 

Also tried with SSH:

$ git clone [email protected]:./Spoon-Knife.git Cloning into 'Spoon-Knife'... Warning: Permanently added the RSA host key for IP address '.' to the list of known hosts. [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.  Please make sure you have the correct access rights and the repository exists. 

Do I need to change some configuration setting on my computer or is this a problem with GitHub?

Edit: I have replaced my username and IP address with "."

like image 448
Hank Lin Avatar asked Dec 31 '18 14:12

Hank Lin


People also ask

How do I fix fatal protocol https is not supported?

Removing the single-quotes from the URL fixed the problem. Save this answer.

What happens when you Git clone?

The Git clone command will create a new local directory for the repository, copy all the contents of the specified repository, create the remote tracked branches, and checkout an initial branch locally. By default, Git clone will create a reference to the remote repository called origin .

Does not appear to be a Git repo?

The “… does not a appear to be a git repository” error is triggered when you try to clone, or run other commands, in a directory that is not recognized as a Git repository. The directory or remote file path might not have initialized Git, or the file path you are trying to access as an active repository is incorrect.


2 Answers

Problem is probably this.

You tried to paste it using

  • CTRL + V

before and it didn't work so you went ahead and pasted it with classic

  • Right Click - Paste**.

Sadly whenever you enter CTRL + V on terminal it adds

  • a hidden ^?

(at least on my machine it encoded like that).

the character that you only appears after you

  • backspace

(go ahead an try it on git bash).

So your link becomes ^?https://...

which is invalid.

like image 195
user11452886 Avatar answered Sep 19 '22 04:09

user11452886


Edit: This particular users problem was solved by starting a new terminal session.

A ? before the protocol (https) is not support. You want this:

git clone [email protected]:octocat/Spoon-Knife.git

or this:

git clone https://github.com/octocat/Spoon-Knife.git

Selecting the location to clone

like image 21
TomDunning Avatar answered Sep 18 '22 04:09

TomDunning