Tag Archives: git

Git Error: remote: HTTP Basic: Access denied [How to Solve]


The user name and password configured by local git are inconsistent with those registered on gitlab.


If the account and password are changed, execute the following commands on the GIT command line

git config --system --unset credential.helper

Then re execute your operations (such as pull and push), and you will be prompted to enter your account and password again.

What’s your feeling?

In retrospect, it seems that I did create a new user name and password, or I changed my password. ok

[Solved] git error – remote: http basic: access denied

After using the git push command, an error is reported as follows:

another error is:

git Failed to connect to port xxxx: Connection refused

based on these two situations, the account and password logged in at the time of the first use are largely inconsistent with the current warehouse account password, so the user will be prompted to connect without permission or refuse access. At this time, the best way is to reset the GIT account password!


first enter the local warehouse directory, then right-click “git bash here”, and enter the following instructions in the pop-up terminal input box:

git config --system --unset credential.helper

Then use the git push command again to guide you to enter the account and password again. After you enter it correctly, you can connect to the remote warehouse successfully!!

git error:invalid path [How to Solve]

Pull handover branch code and error found git error: invalid path xxx or error: unable to create file

    1. git status Look at the code that needs to be processed
    2. git reset –hard To a previous stable version
    3. git clean -df Clear uncommitted files

The file that caused the error was found in the git history

  1. error: unable to create file keycloak-10.0.2/F:\workspace\electric\sedt-webfront\keycloak-10.0.2\standalone\log\server.log: Invalid argument
  2. Who submits the file and who deletes the file
  3. git pull Re-pull the file

Reason: There is a difference between the file path created by Mac and Windows, which causes the file path created cannot be generated in Windows. Delete the file to solve the problem

[Solved] Ubuntu Error: Failed to connect to port xxxxx: Connection refused

Method 1

Check the agent

git config --global http.proxy
git config --global https.proxy

Cancel if you have one, or change another method if you don’t

git config --global --unset http.proxy
git config --global --unset https.proxy

Method 2

Check whether the system environment uses agents

env|grep -I proxy

The following similar configuration appears

If there is a corresponding agent, cancel it

unset http_proxy
unset https_proxy

Method 3

Manually operate the Ubuntu agent and cancel the agent in the settings.

[Solved] Git push error: error: RPC failed; HTTP 413 curl 22 the requested URL returned error: 413


#Accident scene

Git submitted push with enrollment error:

Enumerating objects: 448, done.
Delta compression using up to 4 threads
Total 424 (delta 109), reused 0 (delta 0), pack-reused 0
POST git-receive-pack (433422517 bytes)
Error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413


As can be seen from the above error message, the code size submitted by Git is 433422517 bytes, about 400m; It is suspected that the submitted documents are too large.

1. First, modify the GIT global configuration

git config –global http.postBuffer 524288000

The result is pushed again, which is invalid
it is suspected that the size of the transfer file is limited in other places. In retrospect, the server where Git is located was accessed directly, but later it was accessed after being forwarded by Nginx. Therefore, I think there may be a problem with the Nginx configuration.

2. View git related configuration of Nginx

	location ~ /git(/.*) {
	    # others
	    client_max_body_size 200M;

The client_max_body_Size modify the configuration to 500m and restart Nginx
push again to solve the problem.

Git push Failed to connect to localhost port 1080 [How to Solve]

Conclusion: it is caused by setting agent

1. Check the global settings

Enter git config -- Global - e to check whether there are proxy settings for [HTTP] and [HTTPS] in the global configuration, such as proxy= socks://localhost:1080, if any, delete it.

2. Check the config in the current. Git file

In the current working directory, cat ./.Git/config

As shown in the figure above, delete the agent.

Gt Report Error ssh:connect to host github.com port 22

kex_exchange_identification: Connection closed by remote host
Connection closed by port 22
fatal: Could not read from remote repository.

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

  It is suddenly found that git cannot operate, and an error is reported, as shown in the figure above.

Thought the SSH key failed?Check it. It’s corresponding.


$   ssh -T   [email protected]

The result is still  

Internet search method:

Test port 443 can be successful  

$ ssh -T -p 443 [email protected]

Referring to the online method, the solution is as follows:

  Locate git’s config file  /etc/ssh/ssh_ Config and edit

$   vi /etc/ssh/ssh_ config     

If you don’t have permission, use sudo

Add the following code at the end and save

Host github.com
User git
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443


Then you can operate git normally!

Git pull code error fatal: authentication failed fo

Git pull code error fatal: authentication failed fo

Detailed error reporting information:

git.exe pull --progress -v --no-rebase 
5%9B%BD%E5%AE%B6%E6%96%B0%E5%B9%B3%E5%8F%B0" zj_demo
fatal: Authentication failed for 'http://nj.eliansun.com:8082/tfs/DefaultCollection/%E6%B1%9F%E

The general description is that your voucher is wrong. If you have changed your password recently, you need to modify your local voucher as follows:

Open control panel in --- user account --- credentials management --- windows credentials --- edit --- save

If the account and password are correct (not in accordance with the above), please look below

First kind

Use the command to re-enter the account password

git config --system --unset credential.helper

Errors, i.e. permission problems, may occur, for example:

error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied

The file C:/program files/git/mingw64/etc has insufficient permissions. Change the operation permissions under this folder to all permissions. Windows 10 system can be set to everyone, and then re execute the above commands.


If the above operation cannot modify the permission or the above operation is still invalid, you can use the tool [tortoisegit] for short, little turtle

The specific operations are as follows:
enter the little turtle setting page

double click git, select Edit gitconfig (y) to enter the page, and then modify the following position

Amend as follows

	helper = store

After pulling or other operations, you will be prompted to enter the account password before operation

[Solved] Git error: inflate: data stream error (invalid block type) error: corrupt loose object

Error reported when using git push
error: Insert: data stream error (invalid block type)
error: corrupt loose object ‘c8b7f5f344dbfe7d5b7339b977873c21f71478aa’

I tried many methods. Finally, I cleared the local git, fetched it and pushed it again:

rm -rf .git # Delete the local git repository
# Resume local git repository
git init 
git remote add origin Your repository link
git fetch # git pull = git fetch + git merge
git reset --hard origin/master 
git branch --set-upstream-to=origin/master master  

[Solved] Git push Warning: error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413

1. Error Messages:

execute git push http://git.xxx.com/app/guanghe-app.git –all reward

Error Messages:
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Everything up-to-date

The above problem is caused by the size limitation of HTTP push files. Just submit them in SSH.

2. Upload via SSH

git push ssh://git @ –all

Enumerating objects: 15951, done.
Counting objects: 100% (15951/15951), done.
Delta compression using up to 6 threads
Compressing objects: 100% (2863/2863), done.
Writing objects: 100% (15951/15951), 35.04 MiB | 23.89 MiB/s, done.
Total 15951 (delta 12568), reused 15905 (delta 12533)
remote: Resolving deltas: 100% (12568/12568), done.
To ssh://
 * [new branch]      dev -> dev

The warehouse has been uploaded successfully