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

Change of remote origin may cause this issue

Reading time icon 4 min. read


Readers help support Windows Report. We may get a commission if you buy through our links. Tooltip Icon

Read our disclosure page to find out how can you help Windows Report sustain the editorial team Read more

Key notes

  • 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

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. 

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 http://github.com/[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.