更新Visual Studio 2022后,项目不再受GIT控制
RAN Visual Studio安装程序以下内容:
- 添加了“桌面开发”,其中c ++
- 更新为最新版本17.1.4
现在,当我加载任何项目时,它不再在源控制下。在GIT输出窗口中,我得到了一个非常有用的“发生一个或多个错误”。
使用BitBucket作为源控制提供商。
我尝试使用GIT菜单,唯一启用的选项是创建回购或连接到本地仓库。我尝试连接到本地,没有结果。
有什么办法可以找出错误是什么?
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".
Using the Bitbucket as source control provider.
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
更新为
17.1.5
后,我遇到了同样的问题。我检查了我本地存储库和项目(工作树)文件夹的所有权。
将所有权设置为自己解决了问题。
为此:
工作树
和.git
文件夹的文件夹上。属性
安全>安全
。高级
按钮。更改所有者的
。用户名
。替换子宫颈和对象上的所有者
。应用
和确定。VS然后可以打开本地存储库。
I had the same problem after updating to
17.1.5
.I checked the ownership of the folder of my local repository and my project (Working Tree).
Setting the ownership to myself fixed the problem.
TO DO THIS:
working tree
and.git
folder.Properties
Security
.Advanced
button.Change
for the owner.user name
.Replace owner on subcontainers and objects
.Apply
and Ok.VS can then open the local repository.
我无法连接到git reto,并在更新为17.1.4之后,在我的某些存储库中,在GIT输出中获取“一个或多个错误”消息,而不是全部。
我不使用Atlassian Bitbucket源控制服务。
当运行2022'作为管理员'连接到GIT存储库时,就可以没有错误。
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.
问题解决了。
1-首先安装github桌面
2-将您的存储库添加到githubdesktop
3-全部完成。现在在Visual Studio中打开项目
Problem is solved.
1- first install GitHub Desktop
2- add local your repository to GitHubDesktop
3- All Done. now open project in visual studio
也有同样的问题。似乎链接到GIT的安全更新(请参见 )。
这个问题在我这边有几个阶段。
git config -global -global -add safe.directory/path/to/repo
,它可以在CLI和VS上解锁该功能。因此
git Update
或git Update-ford-for-for-windows
在CLI中。这可能不是必需的,但是我确实重新启动了。Had the same issue. Seems linked to a security update of GIT (see article).
The problem had several phases on my side.
git config --global --add safe.directory /path/to/repo
which worked to unlock the feature on both CLI and VS.So
git update
orgit update-git-for-windows
in CLI. That may not be necessary but I did reboot.我运行以下命令,现在解决了我的问题。
打开CMD然后运行以下内容:
I ran the following command and my issue is now resolved.
Open cmd then run the following:
由于更新V。
更新后的sourcetree git,系统git,然后删除然后重新创建的存储库等。相同的连续错误:“发生一个或多个错误。”
我要回去坚持使用VS外部的Sourcetree进行SCC,并等待解决方案,或者不使用这种情况。
仅供参考:它只是一个没有遥控器的本地存储库:也许与获取sourcetree存储在Windows凭据商店中的凭据有关的凭据IE凭证助手或其他东西
。别人的狡猾的SCC Interop工具:再次咳嗽(Microsoft)和咳嗽。
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.)
当VS2022更新到版本17.1.14时,我遇到了同样的问题。 @ken Bonnin Jr的解决方案可以解决此问题。有关详细信息,我必须在包含的每个位置中运行以下代码.git文件。
路径是带有符号'/'的.git文件的地址。
I faced the same issues when VS2022 was updated to version 17.1.14. The solution from @Ken Bonnin Jr can solve this problem. For the details, I have to run the following code in each location included .git file.
Path is the address at .git file with symbol'/'.
很奇怪,我只是更新git
并作为管理员跑
问题解决了
it weird i just update git
and ran as administrator
problem solved
我通过@uchitesting尝试了这两个建议,并通过我们的
github
托管的存储库获得了一些成功。我的原始代码文件夹正常工作直到17.1.4。这似乎再次重新连接VS和
github
:时重新启动该存储库和分支信息似乎保留在克隆上的vs 17.1.4中,但仅作为管理员。打开这个新的克隆,因为非管理员似乎不会带来相同的结果。
关于在17.1.4升级后停止工作的原始文件夹(我一直以管理员的身份运行),我遵循了
git git git git update-git-for-window
和git git config- -global -Add Safe.Directory/path/to/repo
。现在以管理员的身份打开原始文件夹,请记住git信息。
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: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
andgit config --global --add safe.directory /path/to/repo
.Opening the original folder as Administrator now remembers git info.