Tag Archives: Git Error

[Solved] Git Error: could not read Username for ‘https://github.com’: terminal prompts disabled

An error was encountered while publishing to the remote repository:   could not read Username for ‘ https://github.com ‘: terminal prompts disabled, and the account password is required to be entered. Even if it is entered correctly, it cannot be released normally

Question 1. Terminal prompts disabled

Solution: configure environment variables   GIT_TERMINAL_PROMPT=1

Question 2. You need to enter the account password. Even if it is correct, it cannot be published or pulled

Solution:

1) Set git to save HTTP account password

git config –global credential.helper store

Open console program input

2) Manually pull the GIT project and enter the account password

For example:

Successful cloning is no problem!!!

[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

Link:
https://stackoverflow.com/questions/52529639/gnutls-recv-error-110-the-tls-connection-was-non-properly-terminated

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.name”xxx”

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-1.8.1.2/

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.