Ran Visual Studio Installer for the following:
- Added 'Desktop Development with C '
- Updated VS to the latest version 17.1.4
Now when I load any project, it is no longer under source control. In the Git output window, I get a very helpful "One or more errors occurred".
I've tried going to the Git menu and the only enabled options are to create a repo or connect to a local repo. I've tried connecting to local with no results.
Is there a way I can find out what the errors are?
CodePudding user response:
I cannot connect to git repo and get the "One or more errors occurred" message in the Git output after updating VS to 17.1.4 - on only some of my repos, not all. I do not use the Atlassian Bitbucket source control service.
When running VS 2022 'as administrator' connection to the git repo is possible without errors.
CodePudding user response:
Yep Git from inside Visual Studio is broken here since updating VS. Updated Sourcetree Git, System Git, Deleted then Re-Created repo etc. same continuous error: "One or more errors occurred."
I am going back to sticking with doing SCC in Sourcetree from outside of VS and wait for a fix - or not - as the case may be.
FYI: its only a local repo without remote: maybe something to do with getting the credentials stored by Sourcetree in the Windows Credential Store i.e. credential helper or something..
(There are much much better Software Dev things to do than wasting time trying to fix someone else's dodgy SCC interop tool: coughs (Microsoft) and coughs again.)
CodePudding user response:
So the problem is that we use Atlassian's Bitbucket source control service, which is not supported in Visual Studio.
There was an extension that provided the integration but it is no longer maintained and stopped working after 17.1.2. Thus, updating to 17.1.4 disabled the extension and there is no way to reinstall it.
The solution for Bitbucket users is to use Sourcetree or move to Github until Atlassian provides an extension.
CodePudding user response:
Had the same issue. Seems linked to a security update of GIT (see article).
The problem had several phases on my side.
- Did not update GIT but VS to 17.1.4 and had the problem in the IDE but CLI worked.
- Found this info above and updated GIT. Problem did persist in VS and CLI explicitly asked me to type a command.
git config --global --add safe.directory /path/to/repo
which worked to unlock the feature on both CLI and VS.
So git update
or git update-git-for-windows
in CLI. That may not be necessary but I did reboot.
CodePudding user response:
I tried both of the suggestions by @UchiTesting and got some success with our github
hosted repositories. My original code folder worked fine until 17.1.4.
This appeared to reconnect VS and github
again:
- Launch VS 17.1.4 as Administrator
- Menu > Git > Clone Repository to a new folder
- Note the repository information is correct
- Close VS and relaunch as Administrator
- Open the solution file directly
The repo and branch info appear to be retained in VS 17.1.4 on the clone, but only as Administrator. Opening this new clone as non-Administrator does not appear to bring the same results.
Regarding the original folder that stopped working after the 17.1.4 upgrade (and I always run as Administrator), I followed the steps with both git update-git-for-window
and git config --global --add safe.directory /path/to/repo
.
Opening the original folder as Administrator now remembers git info.
CodePudding user response:
Problem is solved. 1- first install GitHub Desktop 2- add local your repository to GitHubDesktop 3- All Done. now open project in visual studio