git - Visual Studio - 远程 : HTTP Basic: Access denied Error encountered while cloning the remote repository: Git failed with a fatal error

标签 git visual-studio gitlab git-clone

我正在使用 Visual Studio 并尝试从运行 gitlab 的服务器克隆在线存储库。让我们调用服务器 https://gitlab.example.com

当我尝试克隆 repo 时出现以下错误

Remote: HTTP Basic: Access denied
Error encountered while cloning the remote repository: Git failed with a fatal error.
Authentication failed for 'https://gitlab.example.com/username/test.git/'

当我尝试时,系统提示我输入服务器的用户名和密码。我输入了创建 repo 协议(protocol)的用户的用户凭据。

我找到了 similar problem with an answer在 stackoverflow 上,但这对我不起作用。

我正在使用 Visual Studio 2017 Enterprise 15.7.2

最佳答案

Windows 必须保存了您需要更新/删除的 git 凭据。以下步骤在 VS2017 中对我有用。

从 Windows“开始”转到“凭据管理器”,然后在“通用凭据”下选择您的 git url。单击右侧箭头,它应该会展开,您应该会看到两个链接“编辑”和“从保管库中删除”。

单击后面的链接(推荐),重新启动 VS,打开您的项目并执行同步/pull 请求,它应该要求您输入凭据,您应该可以开始了。谢谢

关于git - Visual Studio - 远程 : HTTP Basic: Access denied Error encountered while cloning the remote repository: Git failed with a fatal error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50487708/

相关文章:

git - 如何修改对现有 Pull Request 的审查更改

windows - Visual Studio 2012 无法识别 MSBuild.exe

linux - 如果 GitLab CI 中的条件失败

git - 如何在gitlab中将http设置为项目默认url

linux - 在 Git 中限制远程通信

Git:持续集成,避免 rebase 困惑

git - 如何忽略 NetBeans merge 工具中的空格

c# - WPF 如何使用 StringConverter 将 slider 的值绑定(bind)到标签的内容?

vb.net - 如何在没有表单边框的情况下 move 表单(visual studio)

gitlab 初始 root 密码