When I run git push
, pull
, clone
none of them works.
I get following error when i'm trying to push or pull or clone a repository
fatal: unable to access ' https://github.com/myUsername/myRepo/ ': Operation timed out after 0 milliseconds with 0 out of 0 bytes received
What can cause such an issue? Where and what should I check to find out what is causing this problem?
You are cloning the wrong url. Git repo urls are in the form of:
https://github.com/username/repository.git
With that url you are trying to clone the repository public (or private, depending on your account) front page.
它应该像下面这样:
git clone https://github.com/myUsername/myRepo.git
According this link , When switching branches and doing a submodule update git sometimes messes up the submodule status without you having touched it.
So following codes fixes the issue
git submodule init
git submodule update
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.