git clone failed, one of the solutions


git clone failed, one of the solutions


I recently wrote a small piece of code that I want to upload to GitHub. However, something happened during git clone. Cloning to the local site is extremely slow. After waiting two or three hours, it shows that the cloning failed. See the figure below:
Insert picture description here

Baidu found various methods, such as changing https to git, modifying the value of Compressing, and resetting the value of the communication cache, which had no effect.
Troubleshooting process:
1. Is it a problem with the Git tool or a problem with your own GitHub repository?
You can randomly find a project on GitHub with git clone plus url address (for example: git clone https://github.com/dcfeng32/study.git
) to see if clone succeeds, or find a friend to help clone your own warehouse if If you can download other people's projects, you can't download your own projects. That's because there is a problem with your own projects, so that your friends can't clone your projects.
2. It is determined that it is the problem of my own warehouse. However, I used Google Chrome automatic translation. The gitHub warehouse is displayed as follows. After reading N times, I can't see why.
Insert picture description here
3. New warehouse Demo test, just create a new file named df, git clone new warehouse df. Hey, it worked. Then upload the folder (code) can also upload normally. If you cannot copy the warehouse to the local using the command line, you can only download it. After downloading to the desktop, check whether there is a problem with the directory.
Insert picture description here
As a result, there is a Chinese in the catalog. . . Not noticed by the automatic translation of the browser.
Then the question is coming again, because Chinese git clone fails in the project name, can the folder or file named in Chinese be uploaded successfully?
After repeatedly copying files with different file names to the local and uploading to GitHub, the following conclusions are drawn:
1) Folders or files named in Chinese are uploaded to GitHub through the git command, no problem.
2) When copying the project in the GitHub library to the local, as long as the project directory under the library has Chinese, it will fail to clone. However, the internal directories or internal files of the project do not affect Chinese.

Released six original articles · won praise 0 · Views 4857

Guess you like

Origin blog.csdn.net/weixin_44479378/article/details/90754316