Tag Archives: Git clone

[Solved] Git clone Error: fatal: Protocol ‘HTTPS’ is not supported

Git problem: git clone encountered fatal: Protocol ‘HTTPS’ is not supported problem solution

Reappearance

An error is reported when the clone command is executed in Git bash in Windows protocol ''https'' is not supported

reason

When pasting the address, we use Ctrl + V, which has no effect in Git bash. Then we will use paste in the right-click menu, but unfortunately, using Ctrl + V will add a hidden symbol ^?In Git Bash.

In Git bash, your clone statement may display as normal:

git clone https://gitee.com/qianfanguojin/homework_1.git

But the real statement is as follows:

git clone ^?https://gitee.com/qianfanguojin/homework_1.git

There are more symbols in front of the link, and the protocol becomes ^ HTTPS, which must not be cloned successfully, indicating that the protocol is not supported.

Solution:

Delete the space before HTTPS, and enter the space manually

Git Clone Error: gnutls_handshake() failed: Decryption has failed [How to Solve]

The system is Ubuntu (kylin) 20.04 and git version 2.25.

Clone error

The following error is reported when the GIT clone the warehouse on the GitHub,

fatal: cannot access' https://github.com/xxx/yyy.git ': gnutls_handshake() failed: Decryption has failed.

Repeated many times.

Simple try

Most of the failures of GIT clone are network problems, especially when using GitHub.

First try the proxy, http_ proxy,https_ Proxy, GIT config, http.proxy and other commonly used methods have been tried, and even the hack method of proxychains has been tried, but the results are not good. Instant confidence is gone.

Things are different this time.

 

Recompile

There are two methods to recompile. One is to use the script provided by the boss [1]. The second is to use the source code in apt to compile and package DEB by myself. I refer to [2] [3] two tutorials. The general method is

1. Open source

2. Get the source code apt source git , and modify libcurl4 gnutls dev in Debian/control file to libcurl4 OpenSSL dev.

3. Install the compilation environment, sudo apt get build dep git

4. Compile dpkg buildpackage - B, after a long compilation and a complete set of tests, several Debs are finally packaged. (there are still a few mistakes, regardless)

5. Install the packaged DEB, dpkg - I Git_xxx.deb

Finally, it’s done. Git clone is very slow, but no decryption error is reported. The proxy is set successfully. The last step, apt mark hold git, prevents git from being automatically updated. That’s it.

Postscript

The specific cause of the error has not been thoroughly studied, and it looks more complex. Therefore, a workaround was taken and recorded here. Thank all the original authors.

First update

1. It has been verified that git in livecd (Ubuntu kylin 20.04 Pro) still has this bug. In Galaxy Kirin V10 Sp1 livecd, the installed git also has this bug

2. The GIT of desktop (Intel processor) virtual machine and livecd is normal, so it is suspected that it is a hardware problem

3. Gitee does not have this problem

It is speculated that it is a hardware problem, or even a problem with the CPU instruction set. The bottom layer of TLS uses AES algorithm, and there are related instruction sets in CPU. Gitee has no problem, probably because it uses TLS 1.2 and GitHub is TLS 1.3.

[Solved] Git Clone Error: Please make sure you have the correct access rights and the repository exists.

git clone [email protected]:mypy/testproject.git


Cloning into 'testproject'...
[email protected]: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

When it is determined that the SSH key has been configured on the server side, but still cannot be cloned, the following reasons need to be analyzed:

Execution:

ssh -Tvvv [email protected]

....
debug1: Connecting to test.com[36.99.xxx.xx] port 22.
....

During git clone, SSH protocol is used to connect the server and the default port 22 is used. When the company uses intranet penetration software such as NPs or FRP to map out, the intranet server does not use the standard port 22, so the port needs to be specified during git clone

git clone ssh://[email protected]:22222/mypy/testproject.git

Git clone Error: RPC failed; curl 18 transfer closed with outstanding read data remaining

Git clone RPC failed; Curl 18 transfer closed with outstanding read data remaining error

Cause 1: buffer overflow

Solution: command line input

git config http.postBuffer 524288000

If the clone fails after executing the above command, consider possible cause 2: slow network download speed

Solution: command line input

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999

If the clone still fails, first shallow clone, and then update the remote library locally

git clone --depth=1 http://gitlab.xxx.cn/yyy/zzz.git
git fetch --unshallow

Git clone error not found [How to Solve]

When I pulled another item today, I used my colleague’s account because my account didn’t have permission

But the GIT clone times wrong not found

Then I checked the data and found that it was indeed a permission problem

Solution: (win10 system)

Control panel ——— > User account ———— > Manage windows credentials ———— > Ordinary credentials. Just delete the account without permission

Win10 access control panel method:

Click the win tab in the lower left corner ————– > All applications ————– > Control panel (window) system folder ————- > (control panel)

 

Linux: How to Solve Git clone error

How to Solve Error: error: The requested URL returned error: 401 Unauthorized while accessing

Problem:

Error: error: The requested URL returned error: 401 Unauthorized while accessing
git version1.7.1

Solution 1: Assign a user
git clone https://github.com/org/project.git

change to
git clone https://[email protected]/org/project.git
or
git clone https://username:[email protected]/org/project.git

If it appears in push or pull, then you need to change the remote address
git remote set-url origin https://[email protected]/org/project.git

Solution 2: Remove validation
git config -global http.sslverify false

Solution 3: (recommended)
Upgrade git version ≥ 1.7.10

Solution 4:
Add ssh secret key

 

[Solved] git clone:“server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt C…

I can push by clone project using ssh, but it doesn’t work when I clone project with https. it shows message error as below.

server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none

Solution:

Open your terminal and run following command:

export GIT_SSL_NO_VERIFY=1

Please make sure you have the correct access rights and the repository exists. The problem has been solved when Git clone appears.

After reading a lot of information, I finally figured out the error of the clone command in git. Don’t talk nonsense and go directly to the steps. I hope it will be helpful to everyone.

1 Delete known_hosts under the .ssh folder (search the folder directly) (delete manually, no need for git)

2 Open bash.exe in the bin directory of the downloaded Git and enter the command ssh-keygen -t rsa -C “username” (Note: username is your username on git) , if the execution is successful. return:

Generating public/private rsa key pair.
Enter file in which to save the key (/Users/username/.ssh/id_rsa): //where username is the user name on the computer, this address is also the storage address of the file, and then we press

Press Enter, if you have a storage address before, it will return /Users/your username/.ssh/id_rsa already exists. Overwrite (y/n)? Directly enter y and press Enter. It will appear if there is no storage address before

Enter passphrase(empty for no passphrase); also directly enter, in both cases Enter same passphrase again will appear after enter, and then enter will display a long list of contents

There are also some codes like ..o.. o oo .oS., which shows that the SSH key has been generated. The file directory is: username/.ssh/id_rsa.pub.

 

3  Then find that the system automatically generates two files in the .ssh folder, id_rsa and id_rsa.pub, open id_rsa.pub with Notepad and copy all the contents.

4  Open https://github.com/, log in to your account, and enter Settings to find

5 Then paste the content you copied into the key

Then click Add SSH Key

ok there is one last step

6 Still enter ssh -T [email protected] in bash.exe and then a bunch of content will pop up. You only need to enter yes and press Enter and you are done, and then he will prompt you that you are successful.

Then you can use the git clone command normally, and finally I wish you good luck haha!