No Repository Found in VS Code: 3 Quick Ways to Fix It

Change of remote origin may cause this issue

by Loredana Harsana
Loredana Harsana
Loredana Harsana
Managing Editor
Loredana is a passionate writer with a keen interest in PC software and technology. She started off writing about mobile phones back when Samsung Galaxy S II was... read more
Reviewed by Alex Serban
Alex Serban
Alex Serban
Windows Server & Networking Expert
After moving away from the corporate work-style, Alex has found rewards in a lifestyle of constant analysis, team coordination and pestering his colleagues. Holding an MCSA Windows Server... read more
Affiliate Disclosure
  • GitHub users create repositories and sometimes restrict access to users; if you don't have the correct permissions, you'll likely trigger the no repository found error.
  • Users that have been added as collaborators in a repository will be unable to perform specific actions if they don'tdon't have write access. 
  • Sometimes, the error might be triggered if the specific repository has been deleted or no longer exists.
No Remote Repositories Found
To fix various PC problems, we recommend Restoro PC Repair Tool: This software will repair common computer errors, protect you from file loss, malware, hardware failure and optimize your PC for maximum performance. Fix PC issues and remove viruses now in 3 easy steps:
  1. Download Restoro PC Repair Tool that comes with Patented Technologies (patent available here).
  2. Click Start Scan to find Windows issues that could be causing PC problems.
  3. Click Repair All to fix issues affecting your computer's security and performance
  • Restoro has been downloaded by 0 readers this month.

While trying to clone a GitHub repository or push changes, you might encounter the no remote repositories found error in VS code.

The first thought that comes to your mind is that the repository doesn’t exist. However, in this case, the repo exists, but specific problems have prevented the repository from displaying.

If you’ve been struggling with the no repository found in VS code error, this article will briefly overview the error and steps to help resolve it. 

In this article

Why is no repository found in VS code?

Here are some of the reasons why you’re experiencing the No Repository Found error in VS code:

  • Authentication – To perform any actions on GitHub, like creating a pull request, the user must have sufficient access to the relevant resource. If you try to access a repository where you have yet to be added as a collaborator, you can run into the no remote repositories found error. 
  • Change of Remote Origin – In some cases, the remote origin of the resource you’re trying to access might have been changed, or an incorrect value has been added. When this happens, you won’t be able to access the repository due to errors from the resource origin.

What can I do if no repository is found in vs code?

The following are a couple of troubleshooting steps you can apply to help you fix the no repository found in VS code error:

1. Set Base URL

If you’re attempting to perform actions on a repository, you need to set a base URL on your local machine. 

  1. Launch the VS code app on your PC, and double-click the icon to open the application.
  2. Enter the following commands simultaneously:
    • git remote set-url origin[Username]/[ProjectName].git
    • git add *.java
    • git commit -m ""commit title""
    • git push origin master

Replace the Username and ProjectName with their corresponding data. Once the base URL is set, the no repository error found should be resolved. 

2. Delete Git Credentials

  1. Press the Windows key + R to open the run dialog box, type in control and hit Enter.
  2. In the control panel, click on User Accounts and select Credential Manager.
  3. Click on Windows Credentials and locate the GitHub credentials under the Generic Credentials section.
  4. Click on Remove to delete all the git credentials. 

Sometimes, the problem is not from the URL. Instead, you can check if your password has been changed recently.

If you’ve changed your password recently, the old password may still be in use because the new one has yet to be cached. If this is the case, you need to clear all git-related info from your PC.

In case you run into errors like Credential Managers not working in Windows, be sure to read our guide on how to resolve it.

3. Change the URL of your Local Config File

  1. Navigate to Github’s official website.
  2. On the website, click on your profile icon, and click on Settings.
  3. Scroll down to locate Developer Settings and click on it.
  4. In the next window, click on the Personal Access Tokens tab, and select Generate New Token.
  5. Open the VS code terminal window, and navigate to the directory of your repo.
  6. Once in the directory, type in the command nano and hit Enter: .git/config
  7. Replace the username with your username and the personalToken with the token you generated.
  8. Close the Terminal and try accessing the repo to see if the error persists.

Fixing the no repository found error in VS code is tricky because many factors could trigger the error. However, the error usually lies with access and authentication. 

With the steps above, you should be able to fix the error. If you’ve got alternative solutions that helped you resolve this error, you can let us know in the comments below.

Still experiencing issues?


If the above suggestions have not solved your problem, your computer may experience more severe Windows troubles. We suggest choosing an all-in-one solution like Fortect to fix problems efficiently. After installation, just click the View&Fix button and then press Start Repair.

This article covers:Topics: