How to make git push/pull work again?
I have a bunch of GIT repositories on my laptop, which have their "origin" set to repositories on GitHub. After a commit in a local repository, I do
git push -u origin master
to update the remote repository on GitHub. This was all working fine for a long time, up until a few days ago. According to GitHub, my last successful update was 6 days ago, so 13 Aug 2022.
Now when I try to push a new version, the command just sits there for maybe 5 seconds, then ends without doing anything or writing anything to STDOUT or STDERR.
I thought this might be a permission problem, so I deleted all GitHub entries from GIT's cache, and also from the Windows credential manager. I thought that would force it to ask me for password and/or access token again, but no change.
As far as I know, I didn't change any GIT settings, and I certainly didn't update GIT since I was last able to push changes to GitHub. Local interactions with repositories still work. I can commit, view diffs, see logs, etc.
How do I make GIT interactions with remote repositories on GitHub work again?
Windows 10, using GIT from the command line.
Does pull work?
No, same symptom. The command hangs for about 5 seconds, then ends without doing anything or saying anything.
has this failed in multiple repositories?
Yes, all of them. I have dozens of local repositories that are linked to ones on GitHub as the origin. Attempts at pushing or pulling to/from all of them seem to fail the same way.
show us what git remote show origin says
Very interesting. It does the same thing, meaning it hangs for 5 seconds then does nothing. Here is a transcript:
C:\embed\source\util>git remote show origin C:\embed\source\util>
However, it seems to know something about origin:
C:\embed\source\util>git log --oneline --reverse --decorate d25440b First version in GIT. 1cf8498 (HEAD -> master, origin/master, origin/HEAD) Added error checking routines.
This looks like a strong clue for someone that knows GIT better than I do. It seems that all my local GIT repositories have "forgotten" what the origin is. I have some repositories where the origin is at BitBucket. I just checked one of those, and it has the same problem. So this is apparently an issue with GIT on my machine, not with GitHub or BitBucket.
I checked a few repositories I know I wasn't in recently, and they all have the problem. This means it must be some global GIT setting somewhere? I don't understand GIT enough to make sense of this, though.