Tag Archives: Git Error

[Solved] Git Error: GnuTLS recv error (-110): The TLS connection was non-properly terminated

In the terminal, enter the following steps:

sudo apt-get install build-essential fakeroot dpkg-dev -y
sudo apt-get build-dep git -y
sudo apt-get install libcurl4-openssl-dev -y
cd ~
mkdir source-git
cd source-git/
apt-get source git
cd git-2.*.*/
sed -i -- 's/libcurl4-gnutls-dev/libcurl4-openssl-dev/' ./debian/control
sed -i -- '/TEST\s*=\s*test/d' ./debian/rules
dpkg-buildpackage -rfakeroot -b -uc -us
sudo dpkg -i ../git_*ubuntu*.deb


Git Error: nothing to commit, working directory clean [How to Solve]

Local access to remote changes (only access, not merged): git remote update or git fetch origin

Next, git status - uno : allows you to see if the current branch is ahead/behind/diverging from the remote branch it tracks

Or, git show branch * Master : you can see the commits of all the branches whose names end with master, so you can see the differences between origin/master and master on the commits level

Finally, git diff origin/Master : you can see the difference between origin/master and master in code (file) level

Git Error: Github:remote: Invalid username or password……

LZ is currently in the whole remote warehouse. Submit using HTTPS, in Git bash through a series of commands

Remote: invalid username or password

fatal: Authentication failed for ‘ https://github.com/ …

Baidu has come up with a solution, saying that it can re execute git config command to configure user name and mailbox


gitconfig–-globaluser.email” [email protected]

But it didn’t solve my problem. Later, after searching the answers of major netizens for several times, I found that it was my password setting error

After executing the command, GIT will pop up a GitHub login interface. After you log in successfully, you are required to enter your user name and password. The password here is not your GitHub password or local git password

is GitHub’s personal access tokens instead

After the password is filled in again. Perfect solution

From now on, as long as you submit locally, you can use the following command: git push origin master

Only by pushing the latest changes of the local master branch to GitHub can we have a real distributed version library

Git Error: fatal: Unable to find remote helper for ‘https’

Get code remotely using Git

git clone https://github.com/twlkyao/findfile.git

“Fatal: unable to find remote helper for ‘HTTPS'” (this is because git environment is not completely installed after re installation and needs to be re installed). You can temporarily use git instead of HTTPS and use the following command:

git clone git://github.com/twlkyao/findfile.git

Here we will use code installation to introduce:

Switch to code directory:

cd /opt/git-

Then follow the instructions in INSTALL to set the installation prefix (usually using root installation):

$ make
prefix=/usr all doc info ;# as yourself

# make
prefix=/usr install install-doc install-html install-info ;# as root

then make install

# make install

Git error: The following untracked working tree files would be overwritten by checkout

When switching branches in idea, such an error occurs, resulting in the failure of normal switching

:error: The following untracked working tree files would be overwritten by checkout

According to the error prompt, it is due to some problems caused by untracked working tree files. So as long as we solve these untracked files, we can solve this problem. If you want to keep the changes made on the production server and only incorporate the new configuration items, the processing method is as follows:
git stash
git pull
git stash pop
then you can use git diff – W + file name to confirm the automatic code merging.
conversely, If you want to completely cover the local working version with the files in the code base, the method is as follows:
git reset — hard
git pull
where git reset is for the version, if you want to back the local modification for the file, Use
untracked working tree file
reference: http://blog.csdn.net/sheismylife/article/details/7204345
Note when writing scripts for automatic compilation and deployment:
if you want to write scripts on C2 to automatically obtain the latest code from S1, you should pay attention to:
1, Otherwise, the password will be required every time git pull
2. Do not submit the intermediate files in the project to S1, such as the files in the build directory of cmake project and the files in the target directory of Maven project. Otherwise, the next time you use git pull on C2 and other clients, you will report an error similar to this:
error: untracked working tree file ‘public/images/icon. GIF’ would be written by merge.
you need to execute the following command to repair:
Git reset — hard head
git clean – F – d
git pull

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

          Problem 1:

error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

This error is because the project is too long and the tag resource file is too large

Solution one, most of the online solutions: command terminal input

git   config  — global   http.postBuffer   five hundred and twenty-four million two hundred and eighty-eight thousand

Some people can solve the problem with the above command, but mine is not. You need the following command, only the clone depth is one

$  git   clone  /github_ com/large-repository  — depth   1
$  cd  large-repository
$  git   fetch  — unshallow

Fill in the middle line with the address of your git warehouse( I use HTTP, not SSH

Solution 2: the general clone HTTP mode is easy to cause this problem, and the SSH mode is also effective, that is, the change from HTTPS:// to git://

The second problem encountered is: 1

warning: templates not found /usr/local/git/share/git-core/templates

Input at terminal
open  / usr/local/
In the open directory, you can see:
without   git   Contents
Open the address below and download   git-osx   And install,
and       http://git-scm.com/download/mac

If so   git   Contents
And accordingly   share,git-core,templates   There are all directories, indicating that it’s a matter of permissions.

all directories have permissions       Input on the terminal:
0       sudo   chmod  – R   seven hundred and fifty-five  / usr/local/git/share/git-core/templates
be careful   sudo   To create a directory, you need to enter the current   Mac   User’s password
0       Finally, it’s time to start again   clone   project

The above problem is that I can’t clone a project successfully with Xcode’s own git, sourcetree and terminal on my Mac.

Problems encountered, other projects can be.


[How to Solve Error] warning: LF will be replaced by CRLF in README.md.

Question type

In windows, the new line character is CRLF, while in Linux, the new line character is lf . The prompt: warning : LF will be replaced by CRLF in README . md . The file will have its original line endings in ;

$ git add .
warning: LF will be replaced by CRLF in text 1/README.md.
The file will have its original line endings in your working directory.
warning: LF will be replaced by CRLF in text 2/README.md.
The file will have its original line endings in your working directory.

Cause of the problem

Settings core.autocrlf=true Post: when checking out, GIT will convert the newline character of the text file to CRLF (only convert the pure lf file). When submitting, GIT will convert the contents of the temporary storage area (that is, the changes we made to the workspace) to LF, and then put it into the version library. When converting the contents of the temporary storage, lf will be converted to CRLF if lf newline character is found in it, and a very important sentence is given below the warning: “LF will be replaced by CRLF”: warning: LF will be replaced by CRLF in.
the file will have its original line endings in your working In the workspace, this file will keep its original newline character

Simply put, set core.autocrlf=true After that, the files in our workspace should be wrapped with CRLF. If LF is introduced when the file is changed, or if the core.autocrlf Previously, the workspace already had lf newlines. When you submit changes, GIT will warn you which files are not pure CRLF files, but git will not modify those files in the workspace without authorization, but modify the temporary storage area (our changes to the workspace).

Best solution

Direct setting core.autocrlf=false ;

Except Notepad editor, everything else is OK

git config -–global core.autocrlf false // Disable automatic conversion

git rm -rf cached . // Clear the cache added to the cache

git add .

git commit -m "Commit the notes"

git push origin master // Push to remote repository