Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 tools for Git not connecting to private Github repository

Tags:

I'm trying to set up Visual Studio 2013 to work with a private repository on Github. I get the following error when I try to clone it, or if I clone with Github for Windows and try to push/pull from Visual Studio:

An error occurred. Detailed message: An error was raised by libgit2. Category = Net (Error). Response status code does not indicate success: 404 (Not Found).

It works correctly with public repositories, but not with a private one. It also works from the Github for windows client.

like image 530
Attila Szasz Avatar asked Nov 14 '13 09:11

Attila Szasz


People also ask

How do I link a GitHub repository to Visual Studio?

In Visual Studio, select Team Explorer from the View menu. In the Team Explorer pane, click the Manage Connections toolbar icon. Click the Connect link in the GitHub section. If none of these options are visible, click Manage Connections and then Connect to GitHub.

How do I set GitHub credentials in Visual Studio code?

Steps to add git credentials in vs codeStep 1: Download git from the official website https://git-scm.com and install it. Step 2: When you're finished installing Git, start Visual Studio Code and verify that Git is now identified. Step 3: Start a new Terminal and configure your 'user.name' and 'user.


1 Answers

With the help of @EdwardThomson I discovered that Visual Studio Git tools is saving credentials to Credential Manager in Windows.
The problem is that it doesn't save it in the Web Credentials category where I was looking for it, but in the Windows Credentials, down in the Generic Credentials group.

This causes problems if you are using multiple private repos with different credentials because you are not prompted again.

You can work around this, if you use the repo url like this: https://username:[email protected]/your_repo_name.

like image 194
Attila Szasz Avatar answered Oct 07 '22 22:10

Attila Szasz