我正在使用 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/