Windows上的Git凭据问题

时间:2018-02-13 06:37:11

标签: git windows-10 gitlab windows-subsystem-for-linux

我在企业gitlab服务器上托管了很少的存储库。直到昨天一切都很好 突然,我的所有公共存储库都开始返回403错误,并且私有的存储库无法通过git进行克隆,错误如下:fatal: repository 'http://gitlab.my-company.com/my/project.git/' not found
我使用的是Windows 10,我试图在同一台PC(Linux的Windows子系统)上运行与Ubuntu完全相同的命令,并且所有内容都适用于同一目录。

我正在尝试的命令:

Projects> git clone http://gitlab.my-company.com/my/project.git
Cloning into 'project'...
remote: The project you were looking for could not be found.
fatal: repository 'http://gitlab.my-company.com/my/project.git/' not found

以下是git log的输出:

18:02:48.454054 git.c:344               trace: built-in: git 'clone' 'http://gitlab.my-company.com/my/project.git'
18:02:48.580533 run-command.c:627       trace: run_command: 'remote-http' 'origin' 'http://gitlab.my-company.com/my/project.git'
18:02:48.658654 git.c:576               trace: exec: 'git-remote-http' 'origin' 'http://gitlab.my-company.com/my/project.git'
18:02:48.658654 run-command.c:627       trace: run_command: 'git-remote-http' 'origin' 'http://gitlab.my-company.com/my/project.git'
18:02:48.945121 run-command.c:627       trace: run_command: 'git credential-manager get'
18:02:49.054428 git.c:576               trace: exec: 'git-credential-manager' 'get'
18:02:49.054428 run-command.c:627       trace: run_command: 'git-credential-manager' 'get'
18:02:49.163803 ...\Common.cs:527       trace: [Main] git-credential-manager (v1.14.0) 'get'
18:02:49.241926 ...\Where.cs:240        trace: [FindGitInstallations] found 1 Git installation(s).
18:02:49.241926 ...Configuration.cs:405 trace: [LoadGitConfiguration] git All config read, 19 entries.
18:02:49.241926 ...\Where.cs:240        trace: [FindGitInstallations] found 1 Git installation(s).
18:02:49.241926 ...Configuration.cs:405 trace: [LoadGitConfiguration] git All config read, 19 entries.
18:02:49.288801 ...\Common.cs:77        trace: [CreateAuthentication] detecting authority type for 'http://gitlab.my-company.com/'.
18:02:49.288801 ...uthentication.cs:137 trace: [GetAuthentication] not github.com, authentication creation aborted.
18:02:49.288801 ...\Common.cs:172       trace: [CreateAuthentication] authority for 'http://gitlab.my-company.com/' is basic with NTLM=Auto.
18:02:49.304424 ...seSecureStore.cs:138 trace: [ReadCredentials] credentials for 'git:http://gitlab.my-company.com' read from store.
18:02:49.304424 ...\Common.cs:559       trace: [QueryCredentials] credentials found.

内置ubuntu上完全相同的命令工作正常,因此它不是网络或错误URL的问题。

看起来像凭据管理器的一些问题,但我不知道如何解决它。我试图在Windows上重新安装git客户端(git version 2.16.1.windows.4)。

有没有办法擦除所有git凭据?

2 个答案:

答案 0 :(得分:0)

通过卸载git并在没有凭据管理器的情况下再次安装来解决问题。

答案 1 :(得分:0)

Windows10。要更新您的凭据,请转到控制面板->凭据管理器->通用凭据。找到与您的git帐户相关的凭据,然后对其进行编辑以使用更新的密码。