Tag Archives: git

[Solved] gnutls_handshake() failed: The TLS connection was non-properly terminated

Error

chiyukunpeng@chiyukunpeng: ~$ git clone --recursive https://github.com/mrnabati/CenterFusion.git
is being cloned to 'CenterFusion'...
fatal: unable to access 'https://github.com/mrnabati/CenterFusion.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

Solution

# check proxy
chiyukunpeng@chiyukunpeng: ~$ git config --global -l
http.postbuffer=524288000
http.proxy=http://proxy.server.com:8080
http.proxy=http://127.0.0.1

# Delete proxy variables one by one
chiyukunpeng@chiyukunpeng: ~$ git config --global  --unset http.proxy http://127.0.0.1
chiyukunpeng@chiyukunpeng: ~$ git config --global  --unset http.proxy http://proxy.server.com:8080
chiyukunpeng@chiyukunpeng: ~$ git config --global  --unset http.postbuffer

Android Studio Warning: Process ‘command ‘git‘‘ finished with non-zero exit value 1

At first, I thought it was a JDK problem. Later, I changed the JDK version and did not fix it. Looking up the information on the Internet, we found that it might be a git problem.

Enter git config user. Name in terminal   No corresponding user name was output.

Then configure the user name and mailbox

$ git config --global user.name usename
$ git config --global user.password password
$ git config --global user.password email

[Solved] Git Error: OpenSSL SSL_read: Connection was reset, errno 10054和Failed to connect to github.com port 443

Question 1: OpenSSL_ read: Connection was reset, errno 10054

When using git to upload your own project, an error will be reported:

Cause of the problem

openssl ssl_ Read: connection reset, errno 10054

This is the SSL certificate of the server that has not been signed by a third party, so an error is reported.

This error is most likely caused by network instability and connection timeout. If you try again, you will still report an error.

Problem solving methods

Method 1

First, check whether the IP corresponding to the domain name of GitHub in the host file of Disk C is correct. If not, query the correct IP https://www.ipaddress.com/

If there is no problem with the IP address, upload it several times.

Method 2

If method one doesn’t work, modify the settings and remove SSL verification
Enter git bash here

Input

git config --global http.sslVerify "false"

At this point, the GIT operation can be executed again

if prompted:

fatal: not in a git directory

Then do it first

git init

Re input:

git config http.sslVerify "false"

Q2: failed to connect to github.com port 443: timed out

When using git push - U origin main to upload an item, another injury occurred:

Cause of the problem

Network problems or agency problems

Problem solving methods

It is found that there is no problem with the network, and the GitHub can be accessed normally,

reference material: https://blog.csdn.net/hustsselbj/article/details/46842191?utm_ medium=distribute.pc_ relevant_ t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase& depth_ 1-utm_ source=distribute.pc_ relevant_ t0.none-task-blog-BlogCommendFromMachineLearnPai2-1.nonecase

It is the problem of agency

Uncheck proxy server and use automatic detection settings

And then git push - U origin main , it’s successful.

Git error when switching branches: Your local changes to the following files would be overwritten by checkout

Problem:

reason:
the branch is switched between the staging area and the local warehouse before the changed file is submitted.

Solution: execute the following commands in turn

git add filename (with suffix) # commit the changed file to the staging area
git commit -m "Changed files" filename (with suffix) # Commit the changed files to the local repository