Nicolas Raoul
Nicolas Raoul

Reputation: 60203

Visual Studio with GitHub: Invalid URI: The URI scheme is not valid

I want to clone my repository to compile and improve it, with Visual Studio Community 2017.

On command line I would type git clone [email protected]:aegif/CmisSync.git

Visual Studio has a Team Explorer view with a Clone button, but it does not seem to work as I would expect, it shows errors:
Invalid URI: The URI scheme is not valid

So I specified a scheme:
Invalid URI: Invalid port specified

So I specify a port:
Git failed with a fatal error. Could not read from remote repository

... which I guess is caused by Visual Studio trying to connect without bothering to authenticate me or creating SSH keys first.

What am I doing wrong?

Upvotes: 2

Views: 4430

Answers (3)

Ozan BAYRAM
Ozan BAYRAM

Reputation: 2901

I had this problem when I try to clone a repo from bitbucket. I just open sourcetree and cloned it. Then switched to Visual Studio 2019 to open it.

Upvotes: 0

Nicolas Raoul
Nicolas Raoul

Reputation: 60203

The GitHub extension for Visual Studio sometimes crashes or makes Visual Studio slower, so another option is:

  1. Download Git from the official website
  2. Install Git for Windows
  3. Using it, clone your repository
  4. Open the local repository from Visual Studio
  5. Perform all Git operations with Git for Windows

Upvotes: 0

Nicolas Raoul
Nicolas Raoul

Reputation: 60203

By default this version of Visual Studio does not include GitHub integration.

First, click Tools>Get tools and features and install GitHub extension for Visual Studio:

enter image description here

Then on the Clone link under GitHub, not the one under Local Git repositories:

enter image description here

Now you can easily select your GitHub repository and clone it.

enter image description here

Upvotes: 2

Related Questions