About [Git] push failure and some error reporting solutions when using TortoiseGit

Please add a picture description

1.报错:No supported authentication methods available (server sent: publickey)

insert image description here
Reason. The little turtle has not set the git path. The solution is as follows:
insert image description here
Change the address marked in the red box to your own git installation address.

2. When using git to push to the remote warehouse, an error is reported Failed to connect to 127.0.0.1 port 7890: connection refused

The reason is that the global proxy is set and not cleared

git config --global http.proxy //复制该命令到git
git config --global --unset http.proxy//查询是否关闭成功

If the error still occurs,
insert image description here
insert image description here
just push again.

3. Errors caused by conflicts between local git and vsgit

Some users who are new to VS may not be familiar with the interface, and open some applications that should not be opened. Even if the git that comes with VS is so, it will have some conflicts with the GIt and TortoiseGit installed by itself. Just close it.
insert image description here
insert image description here
insert image description here
Set it to None, just refresh and resubmit (first restart the computer and try to push again).

4. The computer cannot connect to the github website

At present, github is not blocked. If you can’t access it, it is only caused by the slow speed of the network and the failure of the computer to recognize the URL. We can add it manually.
First test whether you can ping the
win+r key to open the command line and enter cmd.
insert image description here
insert image description here
This is a normal situation. If there is no access, it means that it cannot be recognized.
Solution
Visit the website and click
insert image description here
to copy the address
to open the location of the hosts file C:\Windows\System32\drivers\etc
Open the hosts file with the copied address in Notepad, and
add 140.82.114.3 GitHub.com in the last line (fill in the address you copied)

Proxy access to github

Using a proxy can push files faster
First query the address and port of the computer proxy
insert image description here

Open the git command line and
enter

set http_proxy=socks5://127.0.0.1:7890

set https_proxy=socks5://127.0.0.1:7890

According to the flexible modification of the computer agent, it can
be used up, and it is best to clean it up. Guaranteed less problems

git config --global --unset http.proxy      取消http代理

git config --global --unset https.proxy     取消https代理 

Just enter it on the git command line.

Guess you like

Origin blog.csdn.net/nanmiao666/article/details/131143592