I started up the PC this morning, expecting to be able to work as normal on a Visual Studio project using the Git extension. I made no config changes whatsoever between the last push and when I last had the solution open.
Then, after trying to push some more commits I had made, I get the error:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
I thought that there might have been some problem with Visual Studio, so I tried to push from GitHub Desktop, and I get the same error essentially but through the GUI: "Authentication failed".
I, of course, searched up my issue here, and most of the time, what I read involved changing the URL from HTTPS to SSH or vice versa.
I created my private/public SSH keys and added the public one to my GitHub account. I saw that when using git remote -v
, fetch used SSH while push used HTTPS, so I changed push to use SSH.
I tried to push from the Git Bash console, and after some hanging, it gave me the exact same error as before. Even when cloning the same repository to a different local folder, the same authentication issue is thrown.
I'm the sole administrator of the repository - it's under my user account, no organisations whatsoever. Nothing else comes to mind what I am meant to do to fix this.
Help?
EDIT: To clarify, my error does not include the common error: git@github.com: Permission denied (publickey)
.
Without changing anything, you can test both access with:
ssh -Tv git@github.com
git ls-remote https://github.com/<you>/<yourRepo>
The first one will use your default ~/.ssh/id_rsa
private key: make sure id_rsa.pub is registered to your remote GitHub account.
GitHub Status reported a "Git Operations degradation" earlier today, so make sure to check if the issue persists.
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.