Git remote Repository not found SSH error message indicates that the Git remote repository could not be found via SSH. One of the main reasons could be that you haven’t set the git remote URL for ssh, you can do that via:
git remote set-url origin firstname.lastname@example.org<YourRepository>.git
Above, git remote set-url origin email@example.com is a command that tells Git to change the URL of the repository named “origin”. You can use the git remote set-url command to change a remote repository’s URL. The origin argument specifies that we want to change the URL of the remote named “origin”. The firstname.lastname@example.org:YourRepository.git argument specifies the new URL that we want to set for the remote.
In the above example, the new URL is in the format email@example.com, which uses the ssh protocol to access the repository. The <YourRepository> should be replaced with the actual name of the repository. This command changes the URL for a specific remote repository; if you want to change the URL for all remotes, you should run this command for each remote.
This command is useful when you want to change the remote repository’s URL to use SSH instead of HTTPS.
You can get the full value of firstname.lastname@example.org mentioned above in the SSH tab under the “Code” button of your repository on GitHub. The SSH option is located under the Code button on a GitHub repository page. To access the Code button, click on the Issues or Pull requests tab, which is typically found near the top of the page. When you click on the Code button, a dropdown menu will appear; the SSH option is usually located at the bottom. Below is the image showing where you can find the SSH URL:
The “Git – remote: Repository not found SSH VSCode” issue can be caused by a variety of other factors too, including:
- The repository URL could be wrong.
- The repository may no longer exist or have been deleted.
- You may not have access to the repository because it is private.
- It is possible that the SSH key used for authentication has not been added to your GitHub account, or that the key is invalid.
- There could be a problem with the VSCode settings; double-check the correct ssh path and ssh key path.