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.
Following link can help: an-error-was-raised-by-libgit2-category-net-error.html
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:password@github.com/your_repo_name.
This one worked for me if switching users/multiple repositories with different credentials.
By default windows stores the passwords in passwords vault, by using credentials manager we can update the passwords of saved password of web and windows applications.
Open Credentials Manager > Locate Github account either on windows account or web account and update password.
By deleting github details by above steps Visual studio will prompt password when clone or push.
Try checking if you have a proxy set on Internet Explorer. This fixed the issue for me.
Insufficient privileges on the git-project (i.e. only read) will also give you this error.
I add a similar problem and I just want to add some more information...
atika answer is exact, you should use https://username:password@github.com/your_repository_name. If you need to change the url of the repository after you did some modification, then you can modify the file: "yourProjectRoot/.git/config" - propery: "url" directly. I closed my solution before I did that modification to my git config file.
But I suggest to use userName:password to git url on your initial "Clone". It will then be set properly for any other actions.
Also, I personally had another problem. I cloned from the master repository instead of my own fork of it. Then I was not able to "push" (always got error 403). After I forked from the master (Use fork from the github web interface) then everything was going smoothly (with my user:password into the repository url).
I don't think it is necessary but I recommend to specify your details into "Team Explorer" view - "Home" - "Settings" - "Git Setting" before doing anything else.
Hope it help.
I was using embedded Git that come with Visual Studio 2013.