更新Visual Studio 2022后,项目不再受GIT控制

发布于 2025-01-21 15:32:19 字数 416 浏览 3 评论 0原文

RAN Visual Studio安装程序以下内容:

  1. 添加了“桌面开发”,其中c ++
  2. 更新为最新版本17.1.4

现在,当我加载任何项目时,它不再在源控制下。在GIT输出窗口中,我得到了一个非常有用的“发生一个或多个错误”。

使用BitBucket作为源控制提供商。

我尝试使用GIT菜单,唯一启用的选项是创建回购或连接到本地仓库。我尝试连接到本地,没有结果。

有什么办法可以找出错误是什么?

Ran Visual Studio Installer for the following:

  1. Added 'Desktop Development with C++'
  2. 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".

enter image description here

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

这样的小城市 2025-01-28 15:32:19

更新为17.1.5后,我遇到了同样的问题。
我检查了我本地存储库和项目(工作树)文件夹的所有权。
将所有权设置为自己解决了问题。

为此:

  1. 右键单击包含工作树.git文件夹的文件夹上。
  2. 单击属性
  3. 转到选项卡安全>安全
  4. 单击高级按钮。
  5. 单击更改所有者的
  6. 选择您的用户名
  7. 检查替换子宫颈和对象上的所有者
  8. 单击应用和确定。

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:

  1. Right-click on the folder containing the working tree and .git folder.
  2. Click Properties
  3. Go to tab Security.
  4. Click the Advanced button.
  5. Click Change for the owner.
  6. Select your user name.
  7. Check Replace owner on subcontainers and objects.
  8. Click Apply and Ok.

VS can then open the local repository.

烟雨扶苏 2025-01-28 15:32:19

我无法连接到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.

断舍离 2025-01-28 15:32:19

问题解决了。
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

吲‖鸣 2025-01-28 15:32:19

也有同样的问题。似乎链接到GIT的安全更新(请参见 )。

这个问题在我这边有几个阶段。

  • 没有更新git,而是对17.1.4进行了更新,并且在IDE中遇到了问题,但CLI奏效了。
  • 在上面找到了此信息并更新了git。问题确实持续在VS中,CLI明确要求我键入命令。 git config -global -global -add safe.directory/path/to/repo,它可以在CLI和VS上解锁该功能。

因此git Updategit 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.

  • 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.

说不完的你爱 2025-01-28 15:32:19

我运行以下命令,现在解决了我的问题。
打开CMD然后运行以下内容:

git config --global --add safe.directory /path/to/repo

I ran the following command and my issue is now resolved.
Open cmd then run the following:

git config --global --add safe.directory /path/to/repo
猫七 2025-01-28 15:32:19

由于更新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.)

撩动你心 2025-01-28 15:32:19

当VS2022更新到版本17.1.14时,我遇到了同样的问题。 @ken Bonnin Jr的解决方案可以解决此问题。有关详细信息,我必须在包含的每个位置中运行以下代码.git文件。

git config --global --add safe.directory %(prefix)/Path

路径是带有符号'/'的.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.

git config --global --add safe.directory %(prefix)/Path

Path is the address at .git file with symbol'/'.

灵芸 2025-01-28 15:32:19

很奇怪,我只是更新git
并作为管理员跑
问题解决了

it weird i just update git
and ran as administrator
problem solved

画离情绘悲伤 2025-01-28 15:32:19

我通过@uchitesting尝试了这两个建议,并通过我们的github托管的存储库获得了一些成功。我的原始代码文件夹正常工作直到17.1.4。

这似乎再次重新连接VS和github

  • 启动vs 17.1.4作为管理员
  • 菜单> git>克隆存储库到新文件夹
  • 注意,存储库信息是正确的
  • 关闭vs,并且在管理员
  • 直接打开解决方案文件

时重新启动该存储库和分支信息似乎保留在克隆上的vs 17.1.4中,但仅作为管理员。打开这个新的克隆,因为非管理员似乎不会带来相同的结果。

关于在17.1.4升级后停止工作的原始文件夹(我一直以管理员的身份运行),我遵循了git git git git update-git-for-windowgit 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:

  • 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文