Tag Archives: github

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.

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 
"http://nj.eliansun.com:8082/tfs/DefaultCollection/
%E6%B1%9F%E8%8B%8F%E5%8C%BB%E4%B
F%9D%E9%A1%B9%E7%9B%AE/_git/01_%E6%B
1%9F%E8%8B%8F%E5%8C%BB%E4%BF%9D%E
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
8%8B%8F%E5%8C%
BB%E4%BF%9D%E9%A1%B9%E7%9B%AE/_git/01_%
E6%B1%9F%E8%8B%8F%E5%8C%BB%E4%BF%9D
%E5%9B%BD%E5%AE%B6%E6%96%B0%E5%B9%B3%E5%8F%B0/'

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.

Second

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

[credential]
	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] Springcloud config Error: Error occured cloning to base directory.

An error occurred when springcloud config obtained the remote configuration file
error source code: 2021-11-03 19:51:31.421 warn 6608 – [on (3) – 127.0.0.1]. C.s.e.multiplejgitenvironmentrepository: error occurred cloning to base directory

org.eclipse.jgit.api.errors.TransportException: https://github.com/ClowLAY/spring-cloud-config.git: Cannot open git upload pack

error reason: the project cannot be cloned because the remote GitHub warehouse cannot be connected
solution: modify the configuration file application.properties

#previous code
spring.cloud.config.server.git.uri=https://github.com/ClowLAY/spring-cloud-config.git

#Modified Code
[email protected]:ClowLAY/spring-cloud-config.git

Successfully obtained the remote warehouse configuration file

Note: change the proxy mode from HTTPS to git
remember to change the remote warehouse address to your own remote warehouse address

Git Push Error: Proxy CONNECT aborted [How to Solve]

Git push origin XXX error proxy connect aborted

Let’s first analyze the problem. The error prompt is obvious. The proxy connection is aborted. What causes it
at the beginning, without saying a word, baidu directly. After various operations, cancel the agent, set the agent, cancel again, and try again?It’s useless. It still reports an error, but the initial timeout error has become proxy connect aborted
it’s hard for me. I’ve been working all day. When it’s time to submit, give me the whole deal?Is this the law that problems must happen before work. Hey, I can’t continue the whole process. I’ve seen various methods on the Internet. The original solution is as follows:

It turns out that there is no separate proxy configured for GIT. Configure proxy for git:
git config — global http.proxy‘ http://127.0.0.1:1087 ’
git config –global https.proxy ‘ socks://127.0.0.1:1080 ’

However, I’m sorry, it’s no use. It’s still wrong. But this operation reminds me that I haven’t checked the GIT configuration of my own project.

Solution:

Next is the moment to witness miracles

    1. first open the file where your project is located.

    1. of course, if you can’t see it after opening the project, don’t panic. Open the folder where your project is located, and then click the view – Show – hide project above. Of course, this is win11. The old version is almost the same.

      1. then let’s go to the. Git folder, open the config configuration file, delete the proxy address, push again, and finish the work.

[Solved] OpenSSL ssL_read: Connection was aborted,errno 10053

OpenSSL ssL_Read: connection was aborted, errno 10053 error

Original error message:
git: fatal: unable to access’ https://github.com/overwhatx/gittest.git/ :
OpenSSL ssL_read: Connection was aborted,errno 10053

terms of settlement

Reason: git limits the size of push by default. Run the command to change the limit size to increase the buffer

Solution:
git config -- global http.postbuffer 524288000

Change network authentication settings

Solution:
git config http.sslverify "false"

Git submit code error husky > pre commit [How to Solve]

Reason: the keyword is husky > Baidu found the problem after pre-commit. It was really a file under. Git in the local project that caused the submission failure. This file is a pre-commit file.

Solution steps:

1. Find the .Git folder in the project (you need to display the hidden files before they appear. To display the hidden files: click View Options view show hidden files to confirm). Double click to enter and you can see some files about GIT

2. Go to the .Git folder, go to the hooks folder, and find the pre-commit file.

Pre-commit (client) hook, which will run to check the code style before git types the submission information
If the code does not comply with the corresponding rules, an error is reported.

3. After deleting the file, we commit and find that it can be submitted successfully.

Second question:

Prompt when git pushes: refs cannot be pushed to the remote end

Solution: pull the mainline code again, merge, resolve the conflict, resubmit, and then push to the remote end.

[Solved] Error: SRC refspec master doors not match any

Unable to submit successfully when pushing

error: src refspec master does not match any 
error: failed to push some refs to 'https://gitee.com/xxxxxxx/cool-admin-midway.git'

The content of the question is:

Error: SRC refspec master does not match any
error: failed to push some references to ” https://gitee.com/xxxxxxx/cool-admin-midway.git ’

That is, the warehouse is empty
solution:

Use the git add XXX. Py ( git add. add all) instruction to add all files, and then perform git commit – M “init” to commit all files,

git commit -m "init"

Then in execution

$ git remote add origin xxxxxxxx.git

Last use

$ git push -u origin master

In this way, the code can be uploaded successfully. You can see that the code is uploaded successfully in the warehouse

Summary:

In fact, you only need to do the following steps to upload local projects to GitHub

 1. create a local repository (i.e. folder) and turn it into a Git repository by git init.

 2. Copy the project into this folder and add it to the repository via git add . Add the project to the repository.

 3. commit the project to the repository by using git commit -m "comment content".

 4, after setting up the SSH key on Github, create a new remote repository by git remote add origin https://github.com/guyibang/TEST2.git Associate a local repository with a remote repository.

 5. Finally, push the project from the local repository to the remote repository (i.e. Github) via git push -u origin master; (if the README file is automatically created when you create a new remote repository, it will report an error, see above for the solution).

Complete steps for uploading files locally to gitee

Git global settings:

git config --global user.name "namexxxx"
git config --global user.email "emailxxx"

Create a git repository:

mkdir test_code
cd test_code
git init
git add xxxx (to add files, git add . Add all)
git commit -m "first commit"
git remote add origin https://xxxxx.git
git push -u origin master

[Solved] Win10: Failed to connect to github.com port 443 Timed out

First, Ping github.com to test whether it can connect. Then modify the host.

Step 1: open ipaddress.com, query the following two domain names and record their corresponding IP addresses:

1.github.com 
2.github.global.ssl.fastly.net

Step 2: update the host file

140.82.114.3 github.com 
199.232.69.194 github.global.ssl.fastly.net

Step 3: clean up DNS and try again.

ipconfig /flushdns