git error: cannot handle https
Version 0.99.9i
of git
probably does not support https
protocol.
Try to install a more recent version of git
. The easiest solution would be to install it via apt-get
:
$ apt-get update
$ apt-get install git
After that check that the correct version is used:
$ hash -r
$ which git
/usr/bin/git
If the returned string is not /usr/bin/git
, then you have another older version of git
in your PATH
that is masking the more recent one. Remove it.
If you do not want to install git
via apt-get
or if you do not have administrator privilege on your machine, you can built it from source. You can download them from git website, and compilation should be as simple as:
$ tar -xvfj git-1.7.4.2.tar.bz2
$ cd git-1.7.4.2
$ ./configure --prefix=$HOME/install
$ make && make install
After that, you'll have to add $HOME/install/bin
to your PATH
.
$ hash -r
$ PATH="$HOME/install/bin:${PATH}"
$ git --version
git version 1.7.4.2
git error cannot handle Commit as a builtin
Use commit
instead of Commit
:)
git: fatal: I don't handle protocol 'http'
I copied and pasted the whole line git clone http://...
.
The character between git clone
and http://...
looks like a space, but it is a special Unicode character!
Short answer: After removing this character, and entering a real space, it worked!
For people who love details: I see two ways to reveal ascii vs special-unicode-characters
Way1: Python
Here is the real line:
vi t.txt # copy+paste the line
python
open('t.txt').read()
git clone \xe2\x80\x8b\xe2\x80\x8bhttp://...
Way2: less
vi t.txt # copy+paste the line
LESSCHARSET=ascii less vi.txt
If it looks like git clone <E2><80><8B><E2><80><8B>http://
, then you copy+pasted special-unicode-characters.
fatal: I don't handle protocol 'https'
There is a good chance you have special characters somewhere in your commands according to these two SO posts:
git: fatal: I don't handle protocol 'http'
Git Fetch returns 'fatal: I don't handle protocol https' in windows
Retype the commands and the problem should be alleviated.
Git fatal: protocol 'https' is not supported
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.
Git Fetch returns 'fatal: I don't handle protocol https' in windows
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.
How to resolve git pull,fatal: unable to access 'https://github.com...\': Empty reply from server
I resolved this problem. I think it happened maybe because of https but I am not very sure.
You can Switch remote URLs from HTTPS to SSH.
1.Pls refer to this link for details:https://help.github.com/articles/changing-a-remote-s-url/
Also I had to config the ssh key.
2.Follow this:https://help.github.com/articles/generating-ssh-keys/
I came across this problem because I replaced my mac, but I do the transfer of data,I think it is probably because the key reasons.
How can I make git accept a self signed certificate?
To permanently accept a specific certificate
Try http.sslCAPath
or http.sslCAInfo
. Adam Spiers's answer gives some great examples. This is the most secure solution to the question.
To disable TLS/SSL verification for a single git command
try passing -c
to git
with the proper config variable, or use Flow's answer:
git -c http.sslVerify=false clone https://example.com/path/to/git
To disable SSL verification for all repositories
It is possible to globally deactivate ssl verification. It is highly recommended to NOT do this but it is mentioned for completeness:
git config --global http.sslVerify false # Do NOT do this!
There are quite a few SSL configuration options in git
. From the man page of git config
:
http.sslVerify
Whether to verify the SSL certificate when fetching or pushing over HTTPS.
Can be overridden by the GIT_SSL_NO_VERIFY environment variable.
http.sslCAInfo
File containing the certificates to verify the peer with when fetching or pushing
over HTTPS. Can be overridden by the GIT_SSL_CAINFO environment variable.
http.sslCAPath
Path containing files with the CA certificates to verify the peer with when
fetching or pushing over HTTPS.
Can be overridden by the GIT_SSL_CAPATH environment variable.
A few other useful SSL configuration options:
http.sslCert
File containing the SSL certificate when fetching or pushing over HTTPS.
Can be overridden by the GIT_SSL_CERT environment variable.
http.sslKey
File containing the SSL private key when fetching or pushing over HTTPS.
Can be overridden by the GIT_SSL_KEY environment variable.
http.sslCertPasswordProtected
Enable git's password prompt for the SSL certificate. Otherwise OpenSSL will
prompt the user, possibly many times, if the certificate or private key is encrypted.
Can be overridden by the GIT_SSL_CERT_PASSWORD_PROTECTED environment variable.
Related Topics
Detect When Reader Closes Named Pipe (Fifo)
Qt Does Not Create Output Files in Debug/Release Folders in Linux
Ld_Library_Path: How to Find a Shared Object
Inter-Module Communication in Linux Kernel
Reading Entropy_Avail File Appears to Consume Entropy
How to Mmap() a Large File Without Risking The Oom Killer
Qt - How to Detect Whether The Application Is Running on Gnome or Kde
Programmatically Set Custom Folder/Directory Icon in Linux
Why Does Bash Not Stop on Error for Failures in Sequence of Short-Circuited Commands
How to Restrict Access to Certain Files for a Certain Process
Set Cron Job for 1St Working Day of Every Month in Shell Scripting
Linux Telnet Vt100 Return Key Sends ^M
Ssh Command Output to Save in a Text File in Shell Script
Can Inotify Tell Me Where a Monitored File Is Moved