I started experiencing this issue on Visual Studio Code in Ubuntu 20.04 yesterday.
I did not make any changes to my GitHub credentials, neither did I change anything in the project, but I run any git command to communicate with my remote branch like:
git pull origin dev
I get the error below:
remote: Repository not found.
fatal: Authentication failed for ‘https://github.com/MyUsername/my-project.git/’
Here’s what worked for me:
I tried recloning the project and then running the git pull command but it did not work.
git clone https://my-git-url
I tried setting my credentials again using the below commands but still no luck:
git config --global user.email "email@example.com"
git config --global user.name "John King"
I tried removing the remote repository and re-adding it using the below commands, but still no luck:
git remote remove origin
git remote add origin https://my-git-url
Finally, I decided to try using my default Ubuntu terminal and it worked fine. My big guess is that it’s a bug from Visual Studio Code from the last update that was made some few hours before then (See the screenshot that shows that a Release was done on the same day that I was having the issue). I mean I set up Visual Studio Code using snap, so probably it might have been updated in the background a few hours before then.

Hopefully, they will get it fixed and git remote operations will be fine again.
I started experiencing this issue on Visual Studio Code in Ubuntu 20.04 yesterday.
I did not make any changes to my GitHub credentials, neither did I change anything in the project, but I run any git command to communicate with my remote branch like:
git pull origin dev
I get the error below:
remote: Repository not found.
fatal: Authentication failed for ‘https://github.com/MyUsername/my-project.git/’
Here’s what worked for me:
I tried recloning the project and then running the git pull command but it did not work.
git clone https://my-git-url
I tried setting my credentials again using the below commands but still no luck:
git config --global user.email "email@example.com"
git config --global user.name "John King"
I tried removing the remote repository and re-adding it using the below commands, but still no luck:
git remote remove origin
git remote add origin https://my-git-url
Finally, I decided to try using my default Ubuntu terminal and it worked fine. My big guess is that it’s a bug from Visual Studio Code from the last update that was made some few hours before then (See the screenshot that shows that a Release was done on the same day that I was having the issue). I mean I set up Visual Studio Code using snap, so probably it might have been updated in the background a few hours before then.

Hopefully, they will get it fixed and git remote operations will be fine again.
I started experiencing this issue on Visual Studio Code in Ubuntu 20.04 yesterday.
I did not make any changes to my GitHub credentials, neither did I change anything in the project, but I run any git command to communicate with my remote branch like:
git pull origin dev
I get the error below:
remote: Repository not found.
fatal: Authentication failed for ‘https://github.com/MyUsername/my-project.git/’
Here’s what worked for me:
I tried recloning the project and then running the git pull command but it did not work.
git clone https://my-git-url
I tried setting my credentials again using the below commands but still no luck:
git config --global user.email "email@example.com"
git config --global user.name "John King"
I tried removing the remote repository and re-adding it using the below commands, but still no luck:
git remote remove origin
git remote add origin https://my-git-url
Finally, I decided to try using my default Ubuntu terminal and it worked fine. My big guess is that it’s a bug from Visual Studio Code from the last update that was made some few hours before then (See the screenshot that shows that a Release was done on the same day that I was having the issue). I mean I set up Visual Studio Code using snap, so probably it might have been updated in the background a few hours before then.

Hopefully, they will get it fixed and git remote operations will be fine again.
Я начал испытывать эту проблему на Код Visual Studio in Ubuntu 20.04 вчера.
Я не вносил никаких изменений в свои учетные данные GitHub и ничего не менял в проекте, но запускал любую команду git для связи с моей удаленной веткой, например:
git pull origin dev
Я получаю сообщение об ошибке ниже:
удаленный: репозиторий не найден. фатальный: не удалось выполнить аутентификацию для «https://github.com/MyUsername/my-project.git/»
Вот что сработало для меня:
Я попытался повторно клонировать проект, а затем запустить команду git pull, но это не сработало.
git clone https://my-git-url
Я попытался снова установить свои учетные данные, используя приведенные ниже команды, но все равно не повезло:
git config --global user.email "email@example.com"
git config --global user.name "John King"
Я попытался удалить удаленный репозиторий и повторно добавить его с помощью приведенных ниже команд, но все равно не повезло:
git remote remove origin
git remote add origin https://my-git-url
Наконец, Я решил попробовать использовать свой терминал Ubuntu по умолчанию, и он работал нормально.. Я предполагаю, что это ошибка из Код Visual Studio из последнего обновления, которое было сделано за несколько часов до этого (см. снимок экрана, показывающий, что выпуск был сделан в тот же день, когда у меня возникла проблема). Я имею в виду, что я установил код Visual Studio, используя snap, так что, вероятно, он мог быть обновлен в фоновом режиме за несколько часов до этого.

Надеюсь, они исправят это, и удаленные операции git снова будут в порядке.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Closed
reconstrukt opened this issue
Jul 8, 2020
· 14 comments
Comments
Describe the bug
Attempting to push to a private repo I own, but getting this error:
Authentication failed. Some common reasons include:
- You are not logged in to your account: see File > Options.
- You may need to log out and log back in to refresh your token.
- You do not have permission to access this repository.
- The repository is archived on GitHub. Check the repository settings to confirm you are still permitted to push commits.
- If you use SSH authentication, check that your key is added to the ssh-agent and associated with your account.»
Version & OS
Github Desktop Version 2.5.3
Windows 10 Pro 64 bit
Steps to reproduce the behavior
- Go to Github Desktop
- Click on «Push Origin»
- See error
Expected behavior
Should push successfully.
Have been working on this project repo for several weeks, pushing 10x daily without issue.
Logs
See attached log
2020-07-08.desktop.production.log
Additional context
I can confirm the following:
- I am logged into Github Desktop
- Can fetch/pull/push from other private/owned repos in Github Desktop without issue, confirmed this on several repos
- Not using SSH (that I am aware of?)
I have tried the following:
- Laptop reboot
- Logging out of Github desktop, logging back in
- Re-cloning the repo to another local directory, attempting to push (minor/benign) change — also failed with same error
- Completely removing and re-installing Github desktop, and manually re-adding the local repo
@reconstrukt try the following steps:
- Go to Github account settings and click on Applications
- Go to Authorized OAuth Apps and revoke the Github Desktop application
- Follow the Sign out and Sign In steps within the Github Desktop application
I was encountering the same issues by the way: #10165
@Luckyfive yes, tried that. should have added to my OP above.
I revoked the desktop client app via my GH account, logged out of the desktop client, and re-logged in. This re-auth’ed Github Desktop on my account.
But, still did not fix the problem, still cannot push to this repo.
@reconstrukt thanks for the report. Are you able to push to the repository from the command line?
@steveward i don’t know, but can try. how would i do that?
@reconstrukt
git add <file>git commit -m <message>git push
You can go to Repository > Open in <command_line> (you may need to install Git for Windows if you have not done so already). Then just run the git push command to see if it succeeds.
@Luckyfive @steveward
No dice. Opened powershell, and
cd c:usersmattsitesprobook
git status shows:
On branch master
Your branch is ahead of ‘origin/master’ by 1 commit.
(use «git push» to publish your local commits) in sync with one change to push
then running git push fails, says:
Unable to read from remote repo
@steveward also tried using standard command prompt via «Repository -> Open in Command Line»
same result as above
So strange. So the command line thing made me think to also try this:
- «Repository -> Show in Explorer»
- Right-click in Explorer -> selected «Git Bash Here» from context menu
- In git bash shell, run
git push - Holy moly, it worked
… and now, after that, I can also push from Git Desktop client again …
??
@reconstrukt I’m not sure what would have caused that to get things working in GitHub Desktop, but I’m glad to hear it seems to be working again. Let us know if you run into this again.
@steveward @Luckyfive
IDK if this is related or helpful, but for sake of comprehensiveness its worth mentioning:
I noticed that in the logs the error seemed to be related to
Could not read from remote repository
I thought perhaps this was network-related, so I cleared the DNS cache,
ipconfig /flushdns
I didn’t retest after that (bad QAer!) but then went right to my next hunch which was to try a git push via bash shell, outlined here: #10166 (comment)
Which worked as mentioned above.
TBH, the issue being network-related doesn’t necessarily make logical sense, as I could fetch from this repo just fine, and could also fetch/pull/push from other owned/private repos fine too… But who knows [/shrug]
HTH! Matt
So strange. So the command line thing made me think to also try this:
- «Repository -> Show in Explorer»
- Right-click in Explorer -> selected «Git Bash Here» from context menu
- In git bash shell, run
git push- Holy moly, it worked
… and now, after that, I can also push from Git Desktop client again …
??
Apologies for a reply on a closed record, but following this I get the error:
fatal: unable to access ‘location removed‘: SSL certificate problem: unable to get local issuer certificate
Any ideas on a fix?
@MikeLanglois have you tried re-cloning the repo and just copying over your changes to the new folder?
@Luckyfive Thanks for the reply. I did try pushing to a separate repo, however the original issue mentioned here in Github still remains so doesn’t solve it.
It seems like the original error message was a red herring for my actual problem which was git not liking an upload of a .suo file. Added to gitignore and problem resolved for me. Will leave this here for anyone who comes across this like I did while googling